Skip to content

Commit

Permalink
scsi: acornscsi: Fix an error handling path in acornscsi_probe()
Browse files Browse the repository at this point in the history
'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: e95a1b6 ("[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>
  • Loading branch information
Christophe JAILLET authored and Martin K. Petersen committed Jun 10, 2020
1 parent f47c240 commit 42c76c9
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion drivers/scsi/arm/acornscsi.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 42c76c9

Please sign in to comment.