dmaengine: idxd: Fix missing error code in idxd_cdev_open()
The error code is missing in this code scenario, add the error code '-EINVAL' to the return value 'rc'. Eliminate the follow smatch warning: drivers/dma/idxd/cdev.c:113 idxd_cdev_open() warn: missing error code 'rc'. Reported-by: Abaci Robot <abaci@linux.alibaba.com> Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com> Acked-by: Dave Jiang <dave.jiang@intel.com> Link: https://lore.kernel.org/r/1622628446-87909-1-git-send-email-jiapeng.chong@linux.alibaba.com Signed-off-by: Vinod Koul <vkoul@kernel.org>
This commit is contained in:
committed by
Vinod Koul
parent
fffdaba402
commit
99b18e88a1
@@ -110,6 +110,7 @@ static int idxd_cdev_open(struct inode *inode, struct file *filp)
|
|||||||
pasid = iommu_sva_get_pasid(sva);
|
pasid = iommu_sva_get_pasid(sva);
|
||||||
if (pasid == IOMMU_PASID_INVALID) {
|
if (pasid == IOMMU_PASID_INVALID) {
|
||||||
iommu_sva_unbind_device(sva);
|
iommu_sva_unbind_device(sva);
|
||||||
|
rc = -EINVAL;
|
||||||
goto failed;
|
goto failed;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user