From: Dan Carpenter Date: Fri, 11 Mar 2016 11:19:03 +0000 (+0300) Subject: scsi_dh_alua: uninitialized variable in alua_check_vpd() X-Git-Tag: Ubuntu-5.4-5.4.0-11.14~10383^2~17 X-Git-Url: https://git.proxmox.com/?a=commitdiff_plain;h=100bcb851b8ce09824215cfc2afd661ae8d454c9;p=mirror_ubuntu-focal-kernel.git scsi_dh_alua: uninitialized variable in alua_check_vpd() The pg_updated variable is support to be set to false at the start but it is uninitialized. Fixes: cb0a168cb6b8 ('scsi_dh_alua: update 'access_state' field') Signed-off-by: Dan Carpenter Reviewed-by: Hannes Reinicke Reviewed-by: Manoj Kumar Signed-off-by: Martin K. Petersen --- diff --git a/drivers/scsi/device_handler/scsi_dh_alua.c b/drivers/scsi/device_handler/scsi_dh_alua.c index 5bcdf8dd6fb0..a404a41e871c 100644 --- a/drivers/scsi/device_handler/scsi_dh_alua.c +++ b/drivers/scsi/device_handler/scsi_dh_alua.c @@ -332,7 +332,7 @@ static int alua_check_vpd(struct scsi_device *sdev, struct alua_dh_data *h, { int rel_port = -1, group_id; struct alua_port_group *pg, *old_pg = NULL; - bool pg_updated; + bool pg_updated = false; unsigned long flags; group_id = scsi_vpd_tpg_id(sdev, &rel_port);