sfc: Fix error code in probe
Subsystems (4)
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")
Signed-off-by Dan Carpenter <[email protected]>
--- drivers/net/ethernet/sfc/ef100.c | 1 + 1 file changed, 1 insertion(+)
drivers/net/ethernet/sfc/ef100.c +1 -0
@@ -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
Quoted 5 lines · Dan Carpenter
This failure path should return a negative error code but it currently returns success.
Fixes 51b35a454efd ("sfc: skeleton EF100 PF driver")Signed-off-by Dan Carpenter <[email protected]>
Acked-by Edward Cree <[email protected]>
Thanks for catching this.
From: Dan Carpenter <[email protected]>
Date: Fri, 18 Sep 2020 17:33:11 +0300
Quoted 5 lines
This failure path should return a negative error code but it currently returns success.
Fixes 51b35a454efd ("sfc: skeleton EF100 PF driver")Signed-off-by Dan Carpenter <[email protected]>
Applied, thanks.