From: Wei Yongjun <yongjun_...@trendmicro.com.cn>

Fix to return -ENOMEM in the ecardm_iomap() error handling
case instead of 0, as done elsewhere in this function.

Signed-off-by: Wei Yongjun <yongjun_...@trendmicro.com.cn>
---
 drivers/scsi/arm/acornscsi.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/scsi/arm/acornscsi.c b/drivers/scsi/arm/acornscsi.c
index 09ba186..bee7142 100644
--- a/drivers/scsi/arm/acornscsi.c
+++ b/drivers/scsi/arm/acornscsi.c
@@ -2961,8 +2961,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;

--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to