diff options
author | Artem Chernyshev <artem.chernyshev@red-soft.ru> | 2023-08-15 00:00:30 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2023-08-16 07:08:29 +0100 |
commit | 9944d203fa63721b87eee84a89f7275dc3d25c05 (patch) | |
tree | b2d8f98ae71076915f31a9179b889b4ebe47424a | |
parent | a552bfa16bab4ce901ee721346a28c4e483f4066 (diff) | |
download | linux-stable-9944d203fa63721b87eee84a89f7275dc3d25c05.tar.gz linux-stable-9944d203fa63721b87eee84a89f7275dc3d25c05.tar.bz2 linux-stable-9944d203fa63721b87eee84a89f7275dc3d25c05.zip |
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>
-rw-r--r-- | drivers/net/ethernet/broadcom/b44.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/drivers/net/ethernet/broadcom/b44.c b/drivers/net/ethernet/broadcom/b44.c index 392ec09a1d8a..3e4fb3c3e834 100644 --- a/drivers/net/ethernet/broadcom/b44.c +++ b/drivers/net/ethernet/broadcom/b44.c @@ -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, - bmcr | BMCR_ANRESTART); - r = 0; - } + if (bmcr & BMCR_ANENABLE) + r = b44_writephy(bp, MII_BMCR, + bmcr | BMCR_ANRESTART); spin_unlock_irq(&bp->lock); return r; |