[SCSI] qla4xxx: fix compilation warning
authorVikas Chaudhary <vikas.chaudhary@qlogic.com>
Mon, 9 Aug 2010 12:14:07 +0000 (05:14 -0700)
committerJames Bottomley <James.Bottomley@suse.de>
Wed, 11 Aug 2010 04:59:01 +0000 (00:59 -0400)
Fix following warning:

drivers/scsi/qla4xxx/ql4_nx.c: In function 'qla4_8xxx_get_flash_info':
drivers/scsi/qla4xxx/ql4_nx.c:1952: warning: 'mid' may be used uninitialized in this function
drivers/scsi/qla4xxx/ql4_nx.c:1952: note: 'mid' was declared here
drivers/scsi/qla4xxx/ql4_nx.c:1952: warning: 'fid' may be used uninitialized in this function
drivers/scsi/qla4xxx/ql4_nx.c:1952: note: 'fid' was declared here

Signed-off-by: Vikas Chaudhary <vikas.chaudhary@qlogic.com>
Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
drivers/scsi/qla4xxx/ql4_nx.c

index 1b85235efd8c6ebe3b4a9745b025ea081d7f01c0..e031a734836ed37a372e2f0cf105a029dad46980 100644 (file)
@@ -1953,7 +1953,8 @@ qla4_8xxx_get_fdt_info(struct scsi_qla_host *ha)
        uint16_t cnt, chksum;
        uint16_t *wptr;
        struct qla_fdt_layout *fdt;
-       uint16_t mid, fid;
+       uint16_t mid = 0;
+       uint16_t fid = 0;
        struct ql82xx_hw_data *hw = &ha->hw;
 
        hw->flash_conf_off = FARX_ACCESS_FLASH_CONF;