* [PATCH] broadcom: b44: Use b44_writephy() return value
@ 2023-08-14 21:00 Artem Chernyshev
2023-08-15 7:07 ` Leon Romanovsky
2023-08-16 6:10 ` patchwork-bot+netdevbpf
0 siblings, 2 replies; 3+ messages in thread
From: Artem Chernyshev @ 2023-08-14 21:00 UTC (permalink / raw)
To: Michael Chan
Cc: Artem Chernyshev, David S . Miller, Eric Dumazet, Jakub Kicinski,
Paolo Abeni, netdev, linux-kernel, lvc-project
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>
---
drivers/net/ethernet/broadcom/b44.c | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)
diff --git a/drivers/net/ethernet/broadcom/b44.c b/drivers/net/ethernet/broadcom/b44.c
index 392ec09a1d8a..7f94e42ae277 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;
--
2.37.3
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] broadcom: b44: Use b44_writephy() return value
2023-08-14 21:00 [PATCH] broadcom: b44: Use b44_writephy() return value Artem Chernyshev
@ 2023-08-15 7:07 ` Leon Romanovsky
2023-08-16 6:10 ` patchwork-bot+netdevbpf
1 sibling, 0 replies; 3+ messages in thread
From: Leon Romanovsky @ 2023-08-15 7:07 UTC (permalink / raw)
To: Artem Chernyshev
Cc: Michael Chan, David S . Miller, Eric Dumazet, Jakub Kicinski,
Paolo Abeni, netdev, linux-kernel, lvc-project
On Tue, Aug 15, 2023 at 12:00:30AM +0300, Artem Chernyshev wrote:
> 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>
> ---
> drivers/net/ethernet/broadcom/b44.c | 8 +++-----
> 1 file changed, 3 insertions(+), 5 deletions(-)
>
Thanks,
Reviewed-by: Leon Romanovsky <leonro@nvidia.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] broadcom: b44: Use b44_writephy() return value
2023-08-14 21:00 [PATCH] broadcom: b44: Use b44_writephy() return value Artem Chernyshev
2023-08-15 7:07 ` Leon Romanovsky
@ 2023-08-16 6:10 ` patchwork-bot+netdevbpf
1 sibling, 0 replies; 3+ messages in thread
From: patchwork-bot+netdevbpf @ 2023-08-16 6:10 UTC (permalink / raw)
To: Artem Chernyshev
Cc: michael.chan, davem, edumazet, kuba, pabeni, netdev,
linux-kernel, lvc-project
Hello:
This patch was applied to netdev/net.git (main)
by David S. Miller <davem@davemloft.net>:
On Tue, 15 Aug 2023 00:00:30 +0300 you wrote:
> 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>
>
> [...]
Here is the summary with links:
- broadcom: b44: Use b44_writephy() return value
https://git.kernel.org/netdev/net/c/9944d203fa63
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2023-08-16 6:11 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-08-14 21:00 [PATCH] broadcom: b44: Use b44_writephy() return value Artem Chernyshev
2023-08-15 7:07 ` Leon Romanovsky
2023-08-16 6:10 ` patchwork-bot+netdevbpf
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).