mirror of
https://github.com/torvalds/linux.git
synced 2026-06-08 06:25:52 +02:00
scsi: acornscsi: Fix an error handling path in acornscsi_probe()
[ Upstream commit42c76c9848] 'ret' is known to be 0 at this point. Explicitly return -ENOMEM if one of the 'ecardm_iomap()' calls fail. Link: https://lore.kernel.org/r/20200530081622.577888-1-christophe.jaillet@wanadoo.fr Fixes:e95a1b656a("[ARM] rpc: acornscsi: update to new style ecard driver") Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
4d1cd8c145
commit
6d8ea16c99
|
|
@ -2914,8 +2914,10 @@ static int acornscsi_probe(struct expansion_card *ec, const struct ecard_id *id)
|
|||
|
||||
ashost->base = ecardm_iomap(ec, ECARD_RES_MEMC, 0, 0);
|
||||
ashost->fast = ecardm_iomap(ec, ECARD_RES_IOCFAST, 0, 0);
|
||||
if (!ashost->base || !ashost->fast)
|
||||
if (!ashost->base || !ashost->fast) {
|
||||
ret = -ENOMEM;
|
||||
goto out_put;
|
||||
}
|
||||
|
||||
host->irq = ec->irq;
|
||||
ashost->host = host;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user