Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

[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>

authored by

Jeff Garzik and committed by
Jeff Garzik
ebd1699e 2f84dd70

+1 -1
+1 -1
drivers/ata/sata_sil.c
··· 438 438 u8 status; 439 439 440 440 if (unlikely(bmdma2 & SIL_DMA_SATA_IRQ)) { 441 - u32 serror; 441 + u32 serror = 0xffffffff; 442 442 443 443 /* SIEN doesn't mask SATA IRQs on some 3112s. Those 444 444 * controllers continue to assert IRQ as long as