lkml.org 
[lkml]   [2021]   [Jun]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH net-next v1 5/7] net: usb: asix: add error handling for asix_mdio_* functions
On Sat, Jun 05, 2021 at 01:31:14AM +0200, Andrew Lunn wrote:
> > -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?

ack, done

> Otherwise
>
> Reviewed-by: Andrew Lunn <andrew@lunn.ch>
>
> Andrew
>
>

--
Pengutronix e.K. | |
Steuerwalder Str. 21 | http://www.pengutronix.de/ |
31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |

\
 
 \ /
  Last update: 2021-06-07 09:56    [W:0.040 / U:0.800 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site