]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commit
scsi: elx: efct: Do not use id uninitialized in efct_lio_setup_session()
authorNathan Chancellor <nathan@kernel.org>
Thu, 17 Jun 2021 06:17:21 +0000 (23:17 -0700)
committerMartin K. Petersen <martin.petersen@oracle.com>
Sat, 19 Jun 2021 03:01:04 +0000 (23:01 -0400)
commita25503617834920e772b9abda608d902dbf26b5c
tree4881d481ec136d7a50d1903537654d43cba5d0b4
parent41962aba2dc622b456aaf3c20e1089084714f73f
scsi: elx: efct: Do not use id uninitialized in efct_lio_setup_session()

clang warns:

drivers/scsi/elx/efct/efct_lio.c:1216:24: warning: variable 'id' is
uninitialized when used here [-Wuninitialized]
                      se_sess, node, id);
                                     ^~

Shuffle the debug print after id's initialization so that the actual value
is printed.

Link: https://github.com/ClangBuiltLinux/linux/issues/1397
Link: https://lore.kernel.org/r/20210617061721.2405511-1-nathan@kernel.org
Fixes: 692e5d73a811 ("scsi: elx: efct: LIO backend interface routines")
Reviewed-by: James Smart <jsmart2021@gmail.com>
Signed-off-by: Nathan Chancellor <nathan@kernel.org>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/elx/efct/efct_lio.c