[PATCH] scsi: advansys.c: Cleaning up uninitialized variables

From: Rickard Strandqvist
Date: Sun Jun 01 2014 - 09:02:56 EST


There is a risk that the variable will be used without being initialized.

This was largely found by using a static code analysis program called cppcheck.

Signed-off-by: Rickard Strandqvist <rickard_strandqvist@xxxxxxxxxxxxxxxxxx>
---
drivers/scsi/advansys.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/scsi/advansys.c b/drivers/scsi/advansys.c
index d814588..201ea3b 100644
--- a/drivers/scsi/advansys.c
+++ b/drivers/scsi/advansys.c
@@ -11394,7 +11394,7 @@ static int advansys_board_found(struct Scsi_Host *shost, unsigned int iop,
struct asc_board *boardp = shost_priv(shost);
ASC_DVC_VAR *asc_dvc_varp = NULL;
ADV_DVC_VAR *adv_dvc_varp = NULL;
- int share_irq, warn_code, ret;
+ int share_irq, warn_code, ret = 0;

pdev = (bus_type == ASC_IS_PCI) ? to_pci_dev(boardp->dev) : NULL;

--
1.7.10.4

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/