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: <db0fd284-0b5b-3290-6661-f159908e9918@gmail.com>
Date: Thu, 17 Aug 2023 14:43:08 +0200
From: Heiner Kallweit <hkallweit1@...il.com>
To: Ruan Jinjie <ruanjinjie@...wei.com>, rafal@...ecki.pl,
 bcm-kernel-feedback-list@...adcom.com, davem@...emloft.net,
 edumazet@...gle.com, kuba@...nel.org, pabeni@...hat.com, opendmb@...il.com,
 florian.fainelli@...adcom.com, bryan.whitehead@...rochip.com,
 andrew@...n.ch, linux@...linux.org.uk, mdf@...nel.org, pgynther@...gle.com,
 Pavithra.Sathyanarayanan@...rochip.com, netdev@...r.kernel.org
Subject: Re: [PATCH net-next v2 4/4] net: lan743x: Fix return value check for
 fixed_phy_register()

On 17.08.2023 14:16, Ruan Jinjie wrote:
> fixed_phy_register() function returns -EPROBE_DEFER, -EINVAL and -EBUSY,
> etc, but not return -EIO. use PTR_ERR to fix the issue.
> 
> Fixes: 624864fbff92 ("net: lan743x: add fixed phy support for LAN7431 device")

This isn't a fix. Returning -EIO isn't wrong. Returning the original errno values
may be better, but that's an improvement.
Also combining "net-next" with a Fixes tag is wrong, except the functionality
was added very recently.

> Signed-off-by: Ruan Jinjie <ruanjinjie@...wei.com>
> ---
>  drivers/net/ethernet/microchip/lan743x_main.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/net/ethernet/microchip/lan743x_main.c b/drivers/net/ethernet/microchip/lan743x_main.c
> index a36f6369f132..c81cdeb4d4e7 100644
> --- a/drivers/net/ethernet/microchip/lan743x_main.c
> +++ b/drivers/net/ethernet/microchip/lan743x_main.c
> @@ -1515,7 +1515,7 @@ static int lan743x_phy_open(struct lan743x_adapter *adapter)
>  							    &fphy_status, NULL);
>  				if (IS_ERR(phydev)) {
>  					netdev_err(netdev, "No PHY/fixed_PHY found\n");
> -					return -EIO;
> +					return PTR_ERR(phydev);
>  				}
>  			} else {
>  				goto return_error;


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ