Commit 7141790b authored by Angus Chen's avatar Angus Chen Committed by Alex Williamson

vfio: platform: No need to check res again

In function vfio_platform_regions_init(),we did check res implied
by using while loop,
so no need to check whether res be null or not again.

No functional change intended.
Signed-off-by: default avatarAngus Chen <angus.chen@jaguarmicro.com>
Reviewed-by: default avatarEric Auger <eric.auger@redhat.com>
Link: https://lore.kernel.org/r/20230107034721.2127-1-angus.chen@jaguarmicro.comSigned-off-by: default avatarAlex Williamson <alex.williamson@redhat.com>
parent b7f1a141
......@@ -150,9 +150,6 @@ static int vfio_platform_regions_init(struct vfio_platform_device *vdev)
struct resource *res =
vdev->get_resource(vdev, i);
if (!res)
goto err;
vdev->regions[i].addr = res->start;
vdev->regions[i].size = resource_size(res);
vdev->regions[i].flags = 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment