projects
/
platform
/
kernel
/
linux-rpi.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3ba880a
)
scsi: nsp_cs: Check of ioremap return value
author
Jiasheng Jiang
<jiasheng@iscas.ac.cn>
Thu, 30 Dec 2021 02:11:37 +0000
(10:11 +0800)
committer
Martin K. Petersen
<martin.petersen@oracle.com>
Mon, 10 Jan 2022 16:03:42 +0000
(11:03 -0500)
Since it is possible for ioremap() to fail, 'data->MmioAddress' could be
NULL. Skip entry if ioremap() fails.
Link:
https://lore.kernel.org/r/20211230021137.1823352-1-jiasheng@iscas.ac.cn
Fixes:
0e6f9d270840
("pcmcia: use pcmcia_loop_config in scsi pcmcia drivers")
Signed-off-by: Jiasheng Jiang <jiasheng@iscas.ac.cn>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/pcmcia/nsp_cs.c
patch
|
blob
|
history
diff --git
a/drivers/scsi/pcmcia/nsp_cs.c
b/drivers/scsi/pcmcia/nsp_cs.c
index
8b9e889
..
92c818a
100644
(file)
--- a/
drivers/scsi/pcmcia/nsp_cs.c
+++ b/
drivers/scsi/pcmcia/nsp_cs.c
@@
-1557,6
+1557,9
@@
static int nsp_cs_config_check(struct pcmcia_device *p_dev, void *priv_data)
data->MmioAddress = (unsigned long)
ioremap(p_dev->resource[2]->start,
resource_size(p_dev->resource[2]));
+ if (!data->MmioAddress)
+ goto next_entry;
+
data->MmioLength = resource_size(p_dev->resource[2]);
}
/* If we got this far, we're cool! */