From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751434AbcCKKSa (ORCPT ); Fri, 11 Mar 2016 05:18:30 -0500 Received: from userp1040.oracle.com ([156.151.31.81]:44946 "EHLO userp1040.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750803AbcCKKSW (ORCPT ); Fri, 11 Mar 2016 05:18:22 -0500 Date: Fri, 11 Mar 2016 13:17:56 +0300 From: Dan Carpenter To: "James E.J. Bottomley" , Hannes Reinecke Cc: "Martin K. Petersen" , Bart Van Assche , Johannes Thumshirn , Ewan Milne , linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org Subject: [patch] scsi_dh_alua: uninitialized variable in alua_check_vpd() Message-ID: <20160311101756.GA9384@mwanda> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.24 (2015-08-30) X-Source-IP: aserv0022.oracle.com [141.146.126.234] Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The pg_updated variable is support to be set to zero at the start but it is uninitialized. Fixes: cb0a168cb6b8 ('scsi_dh_alua: update 'access_state' field') Signed-off-by: Dan Carpenter diff --git a/drivers/scsi/device_handler/scsi_dh_alua.c b/drivers/scsi/device_handler/scsi_dh_alua.c index 5bcdf8d..e4f6174 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 = 0; unsigned long flags; group_id = scsi_vpd_tpg_id(sdev, &rel_port);