diff options
Diffstat (limited to 'drivers/net/ethernet/sfc')
-rw-r--r-- | drivers/net/ethernet/sfc/efx.c | 7 | ||||
-rw-r--r-- | drivers/net/ethernet/sfc/mtd.c | 2 |
2 files changed, 7 insertions, 2 deletions
diff --git a/drivers/net/ethernet/sfc/efx.c b/drivers/net/ethernet/sfc/efx.c index 2e6389c55ce..ce07aa516cd 100644 --- a/drivers/net/ethernet/sfc/efx.c +++ b/drivers/net/ethernet/sfc/efx.c @@ -2502,9 +2502,14 @@ static int __devinit efx_pci_probe(struct pci_dev *pci_dev, netif_dbg(efx, probe, efx->net_dev, "initialisation successful\n"); + /* Try to create MTDs, but allow this to fail */ rtnl_lock(); - efx_mtd_probe(efx); /* allowed to fail */ + rc = efx_mtd_probe(efx); rtnl_unlock(); + if (rc) + netif_warn(efx, probe, efx->net_dev, + "failed to create MTDs (%d)\n", rc); + return 0; fail4: diff --git a/drivers/net/ethernet/sfc/mtd.c b/drivers/net/ethernet/sfc/mtd.c index 79c19227204..26b3c23b0b6 100644 --- a/drivers/net/ethernet/sfc/mtd.c +++ b/drivers/net/ethernet/sfc/mtd.c @@ -280,7 +280,7 @@ fail: --part; efx_mtd_remove_partition(part); } - /* mtd_device_register() returns 1 if the MTD table is full */ + /* Failure is unlikely here, but probably means we're out of memory */ return -ENOMEM; } |