From mboxrd@z Thu Jan 1 00:00:00 1970 From: Dan Carpenter Date: Tue, 18 Aug 2015 09:20:29 +0000 Subject: [patch] scsi: aic94xx: set an error code on failure Message-Id: <20150818092029.GD3965@mwanda> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: "James E.J. Bottomley" Cc: Christoph Hellwig , Hannes Reinecke , Mike Christie , Dan Williams , Venkatesh Srinivas , linux-scsi@vger.kernel.org, kernel-janitors@vger.kernel.org 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 diff --git a/drivers/scsi/aic94xx/aic94xx_init.c b/drivers/scsi/aic94xx/aic94xx_init.c index 140cb8e..f6c336b 100644 --- a/drivers/scsi/aic94xx/aic94xx_init.c +++ b/drivers/scsi/aic94xx/aic94xx_init.c @@ -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; } } From mboxrd@z Thu Jan 1 00:00:00 1970 From: Dan Carpenter Subject: [patch] scsi: aic94xx: set an error code on failure Date: Tue, 18 Aug 2015 12:20:29 +0300 Message-ID: <20150818092029.GD3965@mwanda> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from userp1040.oracle.com ([156.151.31.81]:26104 "EHLO userp1040.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750770AbbHRJVI (ORCPT ); Tue, 18 Aug 2015 05:21:08 -0400 Content-Disposition: inline Sender: linux-scsi-owner@vger.kernel.org List-Id: linux-scsi@vger.kernel.org To: "James E.J. Bottomley" Cc: Christoph Hellwig , Hannes Reinecke , Mike Christie , Dan Williams , Venkatesh Srinivas , linux-scsi@vger.kernel.org, kernel-janitors@vger.kernel.org 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 diff --git a/drivers/scsi/aic94xx/aic94xx_init.c b/drivers/scsi/aic94xx/aic94xx_init.c index 140cb8e..f6c336b 100644 --- a/drivers/scsi/aic94xx/aic94xx_init.c +++ b/drivers/scsi/aic94xx/aic94xx_init.c @@ -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; } }