Re: [patch] scsi_dh_alua: uninitialized variable in alua_check_vpd()

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

 



On Fri, Mar 11, 2016 at 11:50:30AM +0100, Hannes Reinecke wrote:
> On 03/11/2016 11:17 AM, Dan Carpenter wrote:
> > 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 <dan.carpenter@xxxxxxxxxx>
> > 
> > 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);
> > 
> I'd prefer 'pg_updated = false'.
> Not that we trip over a static code analyser here :-)

Duh...  Sorry about that.

regards,
dan carpenter

--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[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