]> git.baikalelectronics.ru Git - kernel.git/commitdiff
ata: libata-sff: Fix compilation warning in ata_sff_lost_interrupt()
authorDamien Le Moal <damien.lemoal@opensource.wdc.com>
Tue, 22 Mar 2022 07:01:37 +0000 (16:01 +0900)
committerDamien Le Moal <damien.lemoal@opensource.wdc.com>
Mon, 4 Apr 2022 00:49:42 +0000 (09:49 +0900)
When returning false, ata_sff_altstatus() does not return any status
value, resulting in a compilation warning in ata_sff_lost_interrupt()
("uninitialized symbol 'status'"). Fix this by initializing the local
variable "status" to 0.

Fixes: 95833f53f0f8 ("ata: libata-sff: refactor ata_sff_altstatus()")
Cc: stable@vger.kernel.org
Signed-off-by: Damien Le Moal <damien.lemoal@opensource.wdc.com>
drivers/ata/libata-sff.c

index b3be7a8f5bea6079e5e5d80e0a55b32494483c7f..b1666adc1c3a39160fa4b4f133fc8719990999dc 100644 (file)
@@ -1634,7 +1634,7 @@ EXPORT_SYMBOL_GPL(ata_sff_interrupt);
 
 void ata_sff_lost_interrupt(struct ata_port *ap)
 {
-       u8 status;
+       u8 status = 0;
        struct ata_queued_cmd *qc;
 
        /* Only one outstanding command per SFF channel */