mirror of
https://github.com/raspberrypi/linux.git
synced 2025-12-06 10:00:17 +00:00
vfio/pci: Fix error return code in vfio_ecap_init()
[ Upstream commitd1ce2c7915] The error code returned from vfio_ext_cap_len() is stored in 'len', not in 'ret'. Fixes:89e1f7d4c6("vfio: Add PCI device driver") Reported-by: Hulk Robot <hulkci@huawei.com> Signed-off-by: Zhen Lei <thunder.leizhen@huawei.com> Reviewed-by: Max Gurtovoy <mgurtovoy@nvidia.com> Message-Id: <20210515020458.6771-1-thunder.leizhen@huawei.com> Signed-off-by: Alex Williamson <alex.williamson@redhat.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
8d27efbb0e
commit
c303db1211
@@ -1581,7 +1581,7 @@ static int vfio_ecap_init(struct vfio_pci_device *vdev)
|
|||||||
if (len == 0xFF) {
|
if (len == 0xFF) {
|
||||||
len = vfio_ext_cap_len(vdev, ecap, epos);
|
len = vfio_ext_cap_len(vdev, ecap, epos);
|
||||||
if (len < 0)
|
if (len < 0)
|
||||||
return ret;
|
return len;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user