Skip to content

Commit

Permalink
[SCSI] qla2xxx: Fix "active_mask" may be used uninitialized warning.
Browse files Browse the repository at this point in the history
Since active_mask is first assigned in an "else" block, the compiler throws
a warning saying that the active_mask variable may be used uninitialized in
a print statement later.  Initialize active_mask to 0 in the declaration to
stop the warning.

Signed-off-by: Chad Dupuis <chad.dupuis@qlogic.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
  • Loading branch information
Chad Dupuis authored and James Bottomley committed Aug 29, 2011
1 parent 3173167 commit e5fdae5
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/scsi/qla2xxx/qla_nx.c
Original file line number Diff line number Diff line change
Expand Up @@ -3539,7 +3539,8 @@ qla82xx_dev_failed_handler(scsi_qla_host_t *vha)
static void
qla82xx_need_reset_handler(scsi_qla_host_t *vha)
{
uint32_t dev_state, drv_state, drv_active, active_mask;
uint32_t dev_state, drv_state, drv_active;
uint32_t active_mask = 0;
unsigned long reset_timeout;
struct qla_hw_data *ha = vha->hw;
struct req_que *req = ha->req_q_map[0];
Expand Down

0 comments on commit e5fdae5

Please sign in to comment.