Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ebaa6c0e authored by Jia-Ju Bai's avatar Jia-Ju Bai Committed by Greg Kroah-Hartman
Browse files

atm: firestream: check the return value of ioremap() in fs_init()



[ Upstream commit d4e26aaea7f82ba884dcb4acfe689406bc092dc3 ]

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

Reported-by: default avatarTOTE Robot <oslab@tsinghua.edu.cn>
Signed-off-by: default avatarJia-Ju Bai <baijiaju1990@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent f2462e03
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -1692,6 +1692,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);