Skip to contentSkip to conversation

scsi: aic94xx: set an error code on failure

PATCH In review Dan Carpenter 2 participants 2 messages Aug 18, 2015

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 scsi: 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.

drivers/scsi/aic94xx/aic94xx_init.c +1 -0
index 140cb8e..f6c336b 100644
@@ -104,6 +104,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;
 		}
 	}
Reviewed-by on v1 1/1
#1 lore raw
Quoted 19 lines · Dan Carpenter

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.

drivers/scsi/aic94xx/aic94xx_init.c +1 -1
index 140cb8e..f6c336b 100644
@@ -104,6 +104,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;
 		}
 	}
--
Quoted 3 lines

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

Signature · 6 lines
Johannes Thumshirn                                           Storage
[email protected]                                 +49 911 74053 689
SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: Felix Imendörffer, Jane Smithard, Graham Norton
HRB 21284 (AG Nürnberg)
Key fingerprint = EC38 9CAB C2C4 F25D 8600  D0D0 0393 969D 2D76 0850