Re: [PATCH] sata_sil: fix uninitialized variable use when sil_scr_read() fails

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

 



Yoichi Yuasa wrote:
> Signed-off-by: Yoichi Yuasa <yuasa@xxxxxxxxxxxxxx>
> 
> ---
>  drivers/ata/sata_sil.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/drivers/ata/sata_sil.c b/drivers/ata/sata_sil.c
> index 3cb69d5..d7fff6b 100644
> --- a/drivers/ata/sata_sil.c
> +++ b/drivers/ata/sata_sil.c
> @@ -439,7 +439,7 @@ static void sil_host_intr(struct ata_port *ap, u32 bmdma2)
>  	u8 status;
>  
>  	if (unlikely(bmdma2 & SIL_DMA_SATA_IRQ)) {
> -		u32 serror;
> +		u32 serror = 0;

The first usage of that is

  sil_scr_read(&ap->link, SCR_ERROR, &serror);

which sets the value.  So, I don't think the patch is necessary.  If
it triggers a compile warning, putting uninitialized_var() macro will
be more appropriate.

Thanks.

-- 
tejun

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

[Index of Archives]     [Linux Filesystems]     [Linux SCSI]     [Linux RAID]     [Git]     [Kernel Newbies]     [Linux Newbie]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Samba]     [Device Mapper]

  Powered by Linux