Commit 9944d203 authored by Artem Chernyshev's avatar Artem Chernyshev Committed by David S. Miller

broadcom: b44: Use b44_writephy() return value

Return result of b44_writephy() instead of zero to
deal with possible error.

Found by Linux Verification Center (linuxtesting.org) with SVACE.
Signed-off-by: default avatarArtem Chernyshev <artem.chernyshev@red-soft.ru>
Reviewed-by: default avatarLeon Romanovsky <leonro@nvidia.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent a552bfa1
...@@ -1793,11 +1793,9 @@ static int b44_nway_reset(struct net_device *dev) ...@@ -1793,11 +1793,9 @@ static int b44_nway_reset(struct net_device *dev)
b44_readphy(bp, MII_BMCR, &bmcr); b44_readphy(bp, MII_BMCR, &bmcr);
b44_readphy(bp, MII_BMCR, &bmcr); b44_readphy(bp, MII_BMCR, &bmcr);
r = -EINVAL; r = -EINVAL;
if (bmcr & BMCR_ANENABLE) { if (bmcr & BMCR_ANENABLE)
b44_writephy(bp, MII_BMCR, r = b44_writephy(bp, MII_BMCR,
bmcr | BMCR_ANRESTART); bmcr | BMCR_ANRESTART);
r = 0;
}
spin_unlock_irq(&bp->lock); spin_unlock_irq(&bp->lock);
return r; return r;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment