mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 18:51:56 -04:00
scsi_dh_alua: uninitialized variable in alua_rtpg()
It's possible to use "err" without initializing it. If it happens to be a 2 which is SCSI_DH_RETRY then that could cause a bug. Bart Van Assche pointed out that we should probably re-initialize it for every iteration through the retry loop. Signed-off-by: Dan Carpenter <[email protected]> Reviewed-by: Hannes Reinicke <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]> Signed-off-by: James Bottomley <[email protected]>
This commit is contained in:
parent
c3b46c7326
commit
a4bd852031
1 changed files with 1 additions and 0 deletions
|
|
@ -532,6 +532,7 @@ static int alua_rtpg(struct scsi_device *sdev, struct alua_port_group *pg)
|
|||
return SCSI_DH_DEV_TEMP_BUSY;
|
||||
|
||||
retry:
|
||||
err = 0;
|
||||
retval = submit_rtpg(sdev, buff, bufflen, &sense_hdr, pg->flags);
|
||||
|
||||
if (retval) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue