Skip to content

Commit ebd1699

Browse files
Jeff Garzikjgarzik
authored andcommitted
[libata] sata_sil: fix used-uninit warning
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>
1 parent 2f84dd7 commit ebd1699

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎drivers/ata/sata_sil.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -438,7 +438,7 @@ static void sil_host_intr(struct ata_port *ap, u32 bmdma2)
438438
u8 status;
439439

440440
if (unlikely(bmdma2 & SIL_DMA_SATA_IRQ)) {
441-
u32 serror;
441+
u32 serror = 0xffffffff;
442442

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

0 commit comments

Comments
 (0)