All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] atm: firestream: check the return value of ioremap() in fs_init()
@ 2022-02-25 12:52 Jia-Ju Bai
  2022-02-28 11:50 ` patchwork-bot+netdevbpf
  0 siblings, 1 reply; 2+ messages in thread
From: Jia-Ju Bai @ 2022-02-25 12:52 UTC (permalink / raw)
  To: 3chas3; +Cc: linux-atm-general, netdev, linux-kernel, Jia-Ju Bai

The function ioremap() in fs_init() can fail, so its return value should
be checked.

Reported-by: TOTE Robot <oslab@tsinghua.edu.cn>
Signed-off-by: Jia-Ju Bai <baijiaju1990@gmail.com>
---
 drivers/atm/firestream.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/atm/firestream.c b/drivers/atm/firestream.c
index 3bc3c314a467..4f67404fe64c 100644
--- a/drivers/atm/firestream.c
+++ b/drivers/atm/firestream.c
@@ -1676,6 +1676,8 @@ static int fs_init(struct fs_dev *dev)
 	dev->hw_base = pci_resource_start(pci_dev, 0);
 
 	dev->base = ioremap(dev->hw_base, 0x1000);
+	if (!dev->base)
+		return 1;
 
 	reset_chip (dev);
   
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] atm: firestream: check the return value of ioremap() in fs_init()
  2022-02-25 12:52 [PATCH] atm: firestream: check the return value of ioremap() in fs_init() Jia-Ju Bai
@ 2022-02-28 11:50 ` patchwork-bot+netdevbpf
  0 siblings, 0 replies; 2+ messages in thread
From: patchwork-bot+netdevbpf @ 2022-02-28 11:50 UTC (permalink / raw)
  To: Jia-Ju Bai; +Cc: 3chas3, linux-atm-general, netdev, linux-kernel

Hello:

This patch was applied to netdev/net.git (master)
by David S. Miller <davem@davemloft.net>:

On Fri, 25 Feb 2022 04:52:30 -0800 you wrote:
> The function ioremap() in fs_init() can fail, so its return value should
> be checked.
> 
> Reported-by: TOTE Robot <oslab@tsinghua.edu.cn>
> Signed-off-by: Jia-Ju Bai <baijiaju1990@gmail.com>
> ---
>  drivers/atm/firestream.c | 2 ++
>  1 file changed, 2 insertions(+)

Here is the summary with links:
  - atm: firestream: check the return value of ioremap() in fs_init()
    https://git.kernel.org/netdev/net/c/d4e26aaea7f8

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:[~2022-02-28 11:50 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-02-25 12:52 [PATCH] atm: firestream: check the return value of ioremap() in fs_init() Jia-Ju Bai
2022-02-28 11:50 ` 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.