Skip to content

Commit

Permalink
atm: firestream: check the return value of ioremap() in fs_init()
Browse files Browse the repository at this point in the history
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>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Jia-Ju Bai authored and David S. Miller committed Feb 28, 2022
1 parent 90d4025 commit d4e26aa
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/atm/firestream.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit d4e26aa

Please sign in to comment.