Skip to content

Commit d4e26aa

Browse files
XidianGeneraldavem330
authored andcommitted
atm: firestream: check the return value of ioremap() in fs_init()
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>
1 parent 90d4025 commit d4e26aa

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

drivers/atm/firestream.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1676,6 +1676,8 @@ static int fs_init(struct fs_dev *dev)
16761676
dev->hw_base = pci_resource_start(pci_dev, 0);
16771677

16781678
dev->base = ioremap(dev->hw_base, 0x1000);
1679+
if (!dev->base)
1680+
return 1;
16791681

16801682
reset_chip (dev);
16811683

0 commit comments

Comments
 (0)