summaryrefslogtreecommitdiffstats
path: root/drivers/vfio
diff options
context:
space:
mode:
authorAngus Chen <angus.chen@jaguarmicro.com>2023-01-07 11:47:20 +0800
committerAlex Williamson <alex.williamson@redhat.com>2023-01-23 11:26:28 -0700
commit7141790b5dd47b229e550148789365a3b2192dd7 (patch)
treec29245ae8f687c91c76d156ac395e699cd83a591 /drivers/vfio
parentb7f1a141f3cf8bf4927346e5c7259bc218459fe4 (diff)
downloadlinux-stable-7141790b5dd47b229e550148789365a3b2192dd7.tar.gz
linux-stable-7141790b5dd47b229e550148789365a3b2192dd7.tar.bz2
linux-stable-7141790b5dd47b229e550148789365a3b2192dd7.zip
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: Angus Chen <angus.chen@jaguarmicro.com> Reviewed-by: Eric Auger <eric.auger@redhat.com> Link: https://lore.kernel.org/r/20230107034721.2127-1-angus.chen@jaguarmicro.com Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
Diffstat (limited to 'drivers/vfio')
-rw-r--r--drivers/vfio/platform/vfio_platform_common.c3
1 files changed, 0 insertions, 3 deletions
diff --git a/drivers/vfio/platform/vfio_platform_common.c b/drivers/vfio/platform/vfio_platform_common.c
index 1a0a238ffa35..a9ad3f4d2613 100644
--- a/drivers/vfio/platform/vfio_platform_common.c
+++ b/drivers/vfio/platform/vfio_platform_common.c
@@ -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;