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: <20190613180016.ekg55vzkuczapfpl@shell.armlinux.org.uk>
Date:   Thu, 13 Jun 2019 19:00:16 +0100
From:   Russell King - ARM Linux admin <linux@...linux.org.uk>
To:     Dan Carpenter <dan.carpenter@...cle.com>
Cc:     Ruslan Babayev <ruslan@...ayev.com>, Andrew Lunn <andrew@...n.ch>,
        Florian Fainelli <f.fainelli@...il.com>,
        Heiner Kallweit <hkallweit1@...il.com>,
        "David S. Miller" <davem@...emloft.net>, netdev@...r.kernel.org,
        kernel-janitors@...r.kernel.org
Subject: Re: [PATCH net] net: phy: sfp: clean up a condition

On Thu, Jun 13, 2019 at 09:51:02AM +0300, Dan Carpenter wrote:
> The acpi_node_get_property_reference() doesn't return ACPI error codes,
> it just returns regular negative kernel error codes.  This patch doesn't
> affect run time, it's just a clean up.
> 
> Signed-off-by: Dan Carpenter <dan.carpenter@...cle.com>
> ---
>  drivers/net/phy/sfp.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/net/phy/sfp.c b/drivers/net/phy/sfp.c
> index a991c80e6567..8a99307c1c39 100644
> --- a/drivers/net/phy/sfp.c
> +++ b/drivers/net/phy/sfp.c
> @@ -1848,7 +1848,7 @@ static int sfp_probe(struct platform_device *pdev)
>  		int ret;
>  
>  		ret = acpi_node_get_property_reference(fw, "i2c-bus", 0, &args);
> -		if (ACPI_FAILURE(ret) || !is_acpi_device_node(args.fwnode)) {
> +		if (ret || !is_acpi_device_node(args.fwnode)) {
>  			dev_err(&pdev->dev, "missing 'i2c-bus' property\n");
>  			return -ENODEV;

If "ret" is a Linux error code, should we print its value when reporting
the error so we know why the failure occurred, and propagate the error
code?

>  		}
> -- 
> 2.20.1
> 
> 

-- 
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTC broadband for 0.8mile line in suburbia: sync at 12.1Mbps down 622kbps up
According to speedtest.net: 11.9Mbps down 500kbps up

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ