Re: [PATCH net-next] net: phy: mscc: add missing check on a phy_write return value

From: David Miller
Date: Fri Mar 20 2020 - 00:03:32 EST


From: Antoine Tenart <antoine.tenart@xxxxxxxxxxx>
Date: Thu, 19 Mar 2020 13:48:19 +0100

> Commit a5afc1678044 ("net: phy: mscc: add support for VSC8584 PHY")
> introduced a call to 'phy_write' storing its return value to a variable
> called 'ret'. But 'ret' never was checked for a possible error being
> returned, and hence was not used at all. Fix this by checking the return
> value and exiting the function if an error was returned.
>
> As this does not fix a known bug, this commit is mostly cosmetic and not
> sent as a fix.
>
> Signed-off-by: Antoine Tenart <antoine.tenart@xxxxxxxxxxx>

Applied, thanks.