Skip to contentSkip to conversation

ata: libata-pmp: Fix missing error code in sata_pmp_eh_recover()

PATCH New Jiapeng Chong 1 participant 1 message Jun 1, 2021 libata

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ata: libata-pmp: Fix missing error code in sata_pmp_eh_recover()

The error code is missing in this code scenario, add the error code '-EINVAL' to the return value 'rc'.

Eliminate the follow smatch warning:

drivers/ata/libata-pmp.c:980 sata_pmp_eh_recover() warn: missing error code 'rc'.

---
 drivers/ata/libata-pmp.c | 1 +
 1 file changed, 1 insertion(+)
drivers/ata/libata-pmp.c +1 -0
index ba7be3f..66985af 100644
@@ -977,6 +977,7 @@ static int sata_pmp_eh_recover(struct ata_port *ap)
 			ata_link_warn(pmp_link,
 				"failed to disable NOTIFY (err_mask=0x%x)\n",
 				err_mask);
+			rc = -EINVAL;
 			goto pmp_fail;
 		}
 	}
Signature · 1 line
1.8.3.1