Skip to content

Commit

Permalink
[libata] sata_sil: fix used-uninit warning
Browse files Browse the repository at this point in the history
Init 'serror' to silence the following warning:

drivers/ata/sata_sil.c: In function ‘sil_interrupt’:
drivers/ata/sata_sil.c:453:14: warning: ‘serror’ may be used uninitialized in
this function [-Wuninitialized]

This is not a 'can never happen' but is nonetheless extremely unlikely.
The easiest and cleanest warning fix is simply to init the var,
rather than worry about marking the var uninit-ok.

Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
  • Loading branch information
Jeff Garzik authored and jgarzik committed Aug 19, 2011
1 parent 2f84dd7 commit ebd1699
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/ata/sata_sil.c
Expand Up @@ -438,7 +438,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 = 0xffffffff;

/* SIEN doesn't mask SATA IRQs on some 3112s. Those
* controllers continue to assert IRQ as long as
Expand Down

0 comments on commit ebd1699

Please sign in to comment.