net: e1000: don't try to register eeprom if MTD support is missing
EEPROM support is an optional feature and the driver should work just fine without it. Signed-off-by: Lucas Stach <l.stach@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
This commit is contained in:
parent
a86f9ca824
commit
e9be2ee4cb
|
@ -3588,10 +3588,13 @@ static int e1000_probe(struct pci_dev *pdev, const struct pci_device_id *id)
|
|||
return -EINVAL;
|
||||
}
|
||||
|
||||
ret = e1000_register_eeprom(hw);
|
||||
if (ret < 0) {
|
||||
dev_err(&pdev->dev, "failed to register EEPROM devices!\n");
|
||||
return ret;
|
||||
if (IS_ENABLED(CONFIG_MTD)) {
|
||||
ret = e1000_register_eeprom(hw);
|
||||
if (ret < 0) {
|
||||
dev_err(&pdev->dev,
|
||||
"failed to register EEPROM devices!\n");
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
|
||||
if (e1000_validate_eeprom_checksum(hw))
|
||||
|
|
Loading…
Reference in New Issue