mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-07 06:52:07 +00:00
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: Artem Chernyshev <artem.chernyshev@red-soft.ru> Reviewed-by: Leon Romanovsky <leonro@nvidia.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
a552bfa16b
commit
9944d203fa
1 changed files with 3 additions and 5 deletions
|
@ -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);
|
||||
r = -EINVAL;
|
||||
if (bmcr & BMCR_ANENABLE) {
|
||||
b44_writephy(bp, MII_BMCR,
|
||||
if (bmcr & BMCR_ANENABLE)
|
||||
r = b44_writephy(bp, MII_BMCR,
|
||||
bmcr | BMCR_ANRESTART);
|
||||
r = 0;
|
||||
}
|
||||
spin_unlock_irq(&bp->lock);
|
||||
|
||||
return r;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue