diff options
author | Christophe JAILLET <christophe.jaillet@wanadoo.fr> | 2020-05-30 10:16:22 +0200 |
---|---|---|
committer | Martin K. Petersen <martin.petersen@oracle.com> | 2020-06-10 07:50:25 -0400 |
commit | 42c76c9848e13dbe0538d7ae0147a269dfa859cb (patch) | |
tree | aecd7116a83e4c3bde90d9babe0febb5e851eb7b /drivers | |
parent | f47c24033a1ac3a08e745f50a28c3dd2c5cceda2 (diff) | |
download | linux-42c76c9848e13dbe0538d7ae0147a269dfa859cb.tar.bz2 |
scsi: acornscsi: Fix an error handling path in acornscsi_probe()
'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: e95a1b656a98 ("[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>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/scsi/arm/acornscsi.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/scsi/arm/acornscsi.c b/drivers/scsi/arm/acornscsi.c index ddb52e7ba622..9a912fd0f70b 100644 --- a/drivers/scsi/arm/acornscsi.c +++ b/drivers/scsi/arm/acornscsi.c @@ -2911,8 +2911,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; |