Skip to contentSkip to conversation

sfc: Fix error code in probe

PATCH Applied Dan Carpenter 3 participants 3 messages Sep 18, 2020 – Sep 21, 2020

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 sfc: Fix error code in probe

This failure path should return a negative error code but it currently returns success.

Fixes 51b35a454efd ("sfc: skeleton EF100 PF driver")
---
 drivers/net/ethernet/sfc/ef100.c | 1 +
 1 file changed, 1 insertion(+)
drivers/net/ethernet/sfc/ef100.c +1 -0
index c54b7f8243f3..ffdb36715a49 100644
@@ -490,6 +490,7 @@ static int ef100_pci_probe(struct pci_dev *pci_dev,
 	if (fcw.offset > pci_resource_len(efx->pci_dev, fcw.bar) - ESE_GZ_FCW_LEN) {
 		netif_err(efx, probe, efx->net_dev,
 			  "Func control window overruns BAR\n");
+		rc = -EIO;
 		goto fail;
 	}
 
Signature · 1 line
2.28.0