Skip to content

Commit c5ea022

Browse files
XidianGeneralgregkh
authored andcommitted
atm: firestream: check the return value of ioremap() in fs_init()
[ Upstream commit d4e26aa ] 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> Signed-off-by: Sasha Levin <sashal@kernel.org>
1 parent efdd92c commit c5ea022

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
@@ -1675,6 +1675,8 @@ static int fs_init(struct fs_dev *dev)
16751675
dev->hw_base = pci_resource_start(pci_dev, 0);
16761676

16771677
dev->base = ioremap(dev->hw_base, 0x1000);
1678+
if (!dev->base)
1679+
return 1;
16781680

16791681
reset_chip (dev);
16801682

0 commit comments

Comments
 (0)