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: 2b0e70a1c423 ("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>
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! */