[PATCH next] scsi: mpi3mr: fix uninitialized variables in mpi3mr_bring_ioc_ready

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Initialize the `start_time` & `elapsed_time_sec` variable
to prevent errors when calculating elapsed_time_sec.

Signed-off-by: Abdulrasaq Lawani <abdulrasaqolawani@xxxxxxxxx>
---
 drivers/scsi/mpi3mr/mpi3mr_fw.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/scsi/mpi3mr/mpi3mr_fw.c b/drivers/scsi/mpi3mr/mpi3mr_fw.c
index f1ab76351bd8..f93968b76883 100644
--- a/drivers/scsi/mpi3mr/mpi3mr_fw.c
+++ b/drivers/scsi/mpi3mr/mpi3mr_fw.c
@@ -1363,7 +1363,8 @@ static int mpi3mr_bring_ioc_ready(struct mpi3mr_ioc *mrioc)
 	enum mpi3mr_iocstate ioc_state;
 	u64 base_info;
 	u8 retry = 0;
-	u64 start_time, elapsed_time_sec;
+	u64 start_time = 0;
+	u64 elapsed_time_sec = 0;
 
 retry_bring_ioc_ready:
 

---
base-commit: 40e0c9d414f57d450e3ad03c12765e797fc3fede
change-id: 20240928-driver-fixes-for-mpi3mr_fw-2fac1a9bda03

Best regards,
-- 
Abdulrasaq Lawani <abdulrasaqolawani@xxxxxxxxx>





[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]

  Powered by Linux