lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <452c2588-0e92-7095-f25d-cfe4711e607f@redhat.com>
Date:   Mon, 16 Jan 2023 21:37:14 +0100
From:   Eric Auger <eric.auger@...hat.com>
To:     Angus Chen <angus.chen@...uarmicro.com>,
        alex.williamson@...hat.com, cohuck@...hat.com
Cc:     kvm@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] vfio: platform: No need to check res again

Hi,
On 1/7/23 04:47, Angus Chen wrote:
> 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@...uarmicro.com>
Reviewed-by: Eric Auger <eric.auger@...hat.com>

Eric
> ---
>  drivers/vfio/platform/vfio_platform_common.c | 3 ---
>  1 file changed, 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;

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ