[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <YLq3wuAMvljqEJbn@lunn.ch>
Date: Sat, 5 Jun 2021 01:31:14 +0200
From: Andrew Lunn <andrew@...n.ch>
To: Oleksij Rempel <o.rempel@...gutronix.de>
Cc: "David S. Miller" <davem@...emloft.net>,
Jakub Kicinski <kuba@...nel.org>,
Heiner Kallweit <hkallweit1@...il.com>,
Russell King <linux@...linux.org.uk>, kernel@...gutronix.de,
linux-kernel@...r.kernel.org, linux-usb@...r.kernel.org,
netdev@...r.kernel.org
Subject: Re: [PATCH net-next v1 5/7] net: usb: asix: add error handling for
asix_mdio_* functions
> -void asix_mdio_write(struct net_device *netdev, int phy_id, int loc, int val)
> +static int __asix_mdio_write(struct net_device *netdev, int phy_id, int loc,
> + int val)
> {
> struct usbnet *dev = netdev_priv(netdev);
> __le16 res = cpu_to_le16(val);
> @@ -517,13 +522,24 @@ void asix_mdio_write(struct net_device *netdev, int phy_id, int loc, int val)
> } while (!(smsr & AX_HOST_EN) && (i++ < 30) && (ret != -ENODEV));
> if (ret == -ENODEV) {
> mutex_unlock(&dev->phy_mutex);
> - return;
> + return ret;
Now that you have added an out: it might be better to use a goto?
Otherwise
Reviewed-by: Andrew Lunn <andrew@...n.ch>
Andrew
Powered by blists - more mailing lists