Commit eb44552b authored by Dan Carpenter's avatar Dan Carpenter Committed by Christoph Hellwig

mpt3sas: issue_reset is uninitialized

The "issue_reset" can be used uninitialized.  It should be set to false
at the start.

Also I cleaned up the types a little by using bool.
Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Acked-by: default avatarSreekanth Reddy <Sreekanth.Reddy@avagotech.com>
Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
parent c51e3a4f
...@@ -3419,7 +3419,7 @@ mpt3sas_base_sas_iounit_control(struct MPT3SAS_ADAPTER *ioc, ...@@ -3419,7 +3419,7 @@ mpt3sas_base_sas_iounit_control(struct MPT3SAS_ADAPTER *ioc,
u16 smid; u16 smid;
u32 ioc_state; u32 ioc_state;
unsigned long timeleft; unsigned long timeleft;
u8 issue_reset; bool issue_reset = false;
int rc; int rc;
void *request; void *request;
u16 wait_state_count; u16 wait_state_count;
...@@ -3483,7 +3483,7 @@ mpt3sas_base_sas_iounit_control(struct MPT3SAS_ADAPTER *ioc, ...@@ -3483,7 +3483,7 @@ mpt3sas_base_sas_iounit_control(struct MPT3SAS_ADAPTER *ioc,
_debug_dump_mf(mpi_request, _debug_dump_mf(mpi_request,
sizeof(Mpi2SasIoUnitControlRequest_t)/4); sizeof(Mpi2SasIoUnitControlRequest_t)/4);
if (!(ioc->base_cmds.status & MPT3_CMD_RESET)) if (!(ioc->base_cmds.status & MPT3_CMD_RESET))
issue_reset = 1; issue_reset = true;
goto issue_host_reset; goto issue_host_reset;
} }
if (ioc->base_cmds.status & MPT3_CMD_REPLY_VALID) if (ioc->base_cmds.status & MPT3_CMD_REPLY_VALID)
...@@ -3523,7 +3523,7 @@ mpt3sas_base_scsi_enclosure_processor(struct MPT3SAS_ADAPTER *ioc, ...@@ -3523,7 +3523,7 @@ mpt3sas_base_scsi_enclosure_processor(struct MPT3SAS_ADAPTER *ioc,
u16 smid; u16 smid;
u32 ioc_state; u32 ioc_state;
unsigned long timeleft; unsigned long timeleft;
u8 issue_reset; bool issue_reset = false;
int rc; int rc;
void *request; void *request;
u16 wait_state_count; u16 wait_state_count;
...@@ -3581,7 +3581,7 @@ mpt3sas_base_scsi_enclosure_processor(struct MPT3SAS_ADAPTER *ioc, ...@@ -3581,7 +3581,7 @@ mpt3sas_base_scsi_enclosure_processor(struct MPT3SAS_ADAPTER *ioc,
_debug_dump_mf(mpi_request, _debug_dump_mf(mpi_request,
sizeof(Mpi2SepRequest_t)/4); sizeof(Mpi2SepRequest_t)/4);
if (!(ioc->base_cmds.status & MPT3_CMD_RESET)) if (!(ioc->base_cmds.status & MPT3_CMD_RESET))
issue_reset = 1; issue_reset = false;
goto issue_host_reset; goto issue_host_reset;
} }
if (ioc->base_cmds.status & MPT3_CMD_REPLY_VALID) if (ioc->base_cmds.status & MPT3_CMD_REPLY_VALID)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment