[PATCH 7/6] net/e1000: don't fail to bind on uninitialized flash

Uwe Kleine-König u.kleine-koenig at pengutronix.de
Thu Nov 23 03:12:33 PST 2017


When the flash doesn't hold a valid firmware image there are still
some things (like accessing the flash) possible. Don't return an error
code in this case but return 0 instead. This way the driver is
regularily bound and just doesn't provide a network interface.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig at pengutronix.de>
---
 drivers/net/e1000/main.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/e1000/main.c b/drivers/net/e1000/main.c
index 01c9f39a25f4..bb6ab4eb0360 100644
--- a/drivers/net/e1000/main.c
+++ b/drivers/net/e1000/main.c
@@ -3598,7 +3598,7 @@ static int e1000_probe(struct pci_dev *pdev, const struct pci_device_id *id)
 	}
 
 	if (e1000_validate_eeprom_checksum(hw))
-		return -EINVAL;
+		return 0;
 
 	e1000_get_ethaddr(edev, edev->ethaddr);
 
-- 
2.11.0




More information about the barebox mailing list