* [PATCH] net: ks8851: Check for error irq
@ 2021-12-22 7:59 Jiasheng Jiang
2021-12-22 10:30 ` patchwork-bot+netdevbpf
0 siblings, 1 reply; 2+ messages in thread
From: Jiasheng Jiang @ 2021-12-22 7:59 UTC (permalink / raw)
To: davem, kuba, marex, trix; +Cc: netdev, linux-kernel, Jiasheng Jiang
Because platform_get_irq() could fail and return error irq.
Therefore, it might be better to check it if order to avoid the use of
error irq.
Fixes: 797047f875b5 ("net: ks8851: Implement Parallel bus operations")
Signed-off-by: Jiasheng Jiang <jiasheng@iscas.ac.cn>
---
drivers/net/ethernet/micrel/ks8851_par.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/net/ethernet/micrel/ks8851_par.c b/drivers/net/ethernet/micrel/ks8851_par.c
index 2e8fcce50f9d..c6f517c07bb9 100644
--- a/drivers/net/ethernet/micrel/ks8851_par.c
+++ b/drivers/net/ethernet/micrel/ks8851_par.c
@@ -321,6 +321,8 @@ static int ks8851_probe_par(struct platform_device *pdev)
return ret;
netdev->irq = platform_get_irq(pdev, 0);
+ if (netdev->irq < 0)
+ return netdev->irq;
return ks8851_probe_common(netdev, dev, msg_enable);
}
--
2.25.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] net: ks8851: Check for error irq
2021-12-22 7:59 [PATCH] net: ks8851: Check for error irq Jiasheng Jiang
@ 2021-12-22 10:30 ` patchwork-bot+netdevbpf
0 siblings, 0 replies; 2+ messages in thread
From: patchwork-bot+netdevbpf @ 2021-12-22 10:30 UTC (permalink / raw)
To: Jiasheng Jiang; +Cc: davem, kuba, marex, trix, netdev, linux-kernel
Hello:
This patch was applied to netdev/net.git (master)
by David S. Miller <davem@davemloft.net>:
On Wed, 22 Dec 2021 15:59:44 +0800 you wrote:
> Because platform_get_irq() could fail and return error irq.
> Therefore, it might be better to check it if order to avoid the use of
> error irq.
>
> Fixes: 797047f875b5 ("net: ks8851: Implement Parallel bus operations")
> Signed-off-by: Jiasheng Jiang <jiasheng@iscas.ac.cn>
>
> [...]
Here is the summary with links:
- net: ks8851: Check for error irq
https://git.kernel.org/netdev/net/c/99d7fbb5cedf
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] 2+ messages in thread
end of thread, other threads:[~2021-12-22 10:30 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-12-22 7:59 [PATCH] net: ks8851: Check for error irq Jiasheng Jiang
2021-12-22 10:30 ` patchwork-bot+netdevbpf
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.