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: <e7c7dbbd-7a8a-3c81-6b78-7069f71642b0@gmail.com>
Date:   Tue, 26 Jul 2022 23:48:34 -0400
From:   Sean Anderson <seanga2@...il.com>
To:     Rolf Eike Beer <eike-kernel@...tec.de>, netdev@...r.kernel.org
Subject: Re: [PATCH 3/3] sunhme: forward the error code from
 pci_enable_device()

On 2/3/22 11:23 AM, Rolf Eike Beer wrote:
> This already returns a proper error value, so pass it to the caller.
> 
> Signed-off-by: Rolf Eike Beer <eike-kernel@...tec.de>
> ---
>   drivers/net/ethernet/sun/sunhme.c | 5 +++--
>   1 file changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/net/ethernet/sun/sunhme.c b/drivers/net/ethernet/sun/sunhme.c
> index 43834339bb43..980a936ce8d1 100644
> --- a/drivers/net/ethernet/sun/sunhme.c
> +++ b/drivers/net/ethernet/sun/sunhme.c
> @@ -2969,11 +2969,12 @@ static int happy_meal_pci_probe(struct pci_dev *pdev,
>   		strcpy(prom_name, "SUNW,hme");
>   #endif
>   
> -	err = -ENODEV;
> +	err = pci_enable_device(pdev);
>   
> -	if (pci_enable_device(pdev))
> +	if (err)
>   		goto err_out;
>   	pci_set_master(pdev);
> +	err = -ENODEV;
>   	if (!strcmp(prom_name, "SUNW,qfe") || !strcmp(prom_name, "qfe")) {
>   		qp = quattro_pci_find(pdev);
> 

This is incrementally better, but there are several more calls like this. A follow
up converting those as well would be good.

Reviewed-by: Sean Anderson <seanga2@...il.com>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ