/[packages]/updates/8/kernel/current/SOURCES/atm-firestream-check-the-return-value-of-ioremap-in-.patch
ViewVC logotype

Contents of /updates/8/kernel/current/SOURCES/atm-firestream-check-the-return-value-of-ioremap-in-.patch

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1795002 - (show annotations) (download)
Wed Mar 16 20:40:50 2022 UTC (2 years ago) by tmb
File size: 1077 byte(s)
add current -stable queue
1 From 4414123c959628858b2974ba0d94e863e0bb47d8 Mon Sep 17 00:00:00 2001
2 From: Sasha Levin <sashal@kernel.org>
3 Date: Fri, 25 Feb 2022 04:52:30 -0800
4 Subject: atm: firestream: check the return value of ioremap() in fs_init()
5
6 From: Jia-Ju Bai <baijiaju1990@gmail.com>
7
8 [ Upstream commit d4e26aaea7f82ba884dcb4acfe689406bc092dc3 ]
9
10 The function ioremap() in fs_init() can fail, so its return value should
11 be checked.
12
13 Reported-by: TOTE Robot <oslab@tsinghua.edu.cn>
14 Signed-off-by: Jia-Ju Bai <baijiaju1990@gmail.com>
15 Signed-off-by: David S. Miller <davem@davemloft.net>
16 Signed-off-by: Sasha Levin <sashal@kernel.org>
17 ---
18 drivers/atm/firestream.c | 2 ++
19 1 file changed, 2 insertions(+)
20
21 diff --git a/drivers/atm/firestream.c b/drivers/atm/firestream.c
22 index 3bc3c314a467..4f67404fe64c 100644
23 --- a/drivers/atm/firestream.c
24 +++ b/drivers/atm/firestream.c
25 @@ -1676,6 +1676,8 @@ static int fs_init(struct fs_dev *dev)
26 dev->hw_base = pci_resource_start(pci_dev, 0);
27
28 dev->base = ioremap(dev->hw_base, 0x1000);
29 + if (!dev->base)
30 + return 1;
31
32 reset_chip (dev);
33
34 --
35 2.34.1
36

  ViewVC Help
Powered by ViewVC 1.1.30