Browse Source

aic94xx: set an error code on failure

We recently did some cleanup here and now the static checkers notice
that there is a missing error code when ioremap() fails.  Let's set it
to -ENOMEM.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de>
Signed-off-by: James Bottomley <JBottomley@Odin.com>
Dan Carpenter 10 năm trước cách đây
mục cha
commit
9f55bca2b8
1 tập tin đã thay đổi với 1 bổ sung0 xóa
  1. 1 0
      drivers/scsi/aic94xx/aic94xx_init.c

+ 1 - 0
drivers/scsi/aic94xx/aic94xx_init.c

@@ -109,6 +109,7 @@ static int asd_map_memio(struct asd_ha_struct *asd_ha)
 		if (!io_handle->addr) {
 			asd_printk("couldn't map MBAR%d of %s\n", i==0?0:1,
 				   pci_name(asd_ha->pcidev));
+			err = -ENOMEM;
 			goto Err_unreq;
 		}
 	}