Skip to content

Commit 76ed2f6

Browse files
author
Damien Le Moal
committed
ata: libata-sff: Fix compilation warning in ata_sff_lost_interrupt()
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: 03c0e84 ("ata: libata-sff: refactor ata_sff_altstatus()") Cc: stable@vger.kernel.org Signed-off-by: Damien Le Moal <damien.lemoal@opensource.wdc.com>
1 parent 3123109 commit 76ed2f6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/ata/libata-sff.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1634,7 +1634,7 @@ EXPORT_SYMBOL_GPL(ata_sff_interrupt);
16341634

16351635
void ata_sff_lost_interrupt(struct ata_port *ap)
16361636
{
1637-
u8 status;
1637+
u8 status = 0;
16381638
struct ata_queued_cmd *qc;
16391639

16401640
/* Only one outstanding command per SFF channel */

0 commit comments

Comments
 (0)