diff options
Diffstat (limited to 'drivers/net/ethernet')
-rw-r--r-- | drivers/net/ethernet/freescale/dpa/dpaa_eth.c | 3 | ||||
-rw-r--r-- | drivers/net/ethernet/freescale/dpa/dpaa_eth_shared.c | 2 |
2 files changed, 3 insertions, 2 deletions
diff --git a/drivers/net/ethernet/freescale/dpa/dpaa_eth.c b/drivers/net/ethernet/freescale/dpa/dpaa_eth.c index f121d4f..67d53d0 100644 --- a/drivers/net/ethernet/freescale/dpa/dpaa_eth.c +++ b/drivers/net/ethernet/freescale/dpa/dpaa_eth.c @@ -3070,6 +3070,7 @@ out_error: } static const struct of_device_id dpa_match[]; + static int dpaa_eth_priv_probe(struct platform_device *_of_dev) { @@ -3119,7 +3120,7 @@ dpaa_eth_priv_probe(struct platform_device *_of_dev) priv->msg_enable = netif_msg_init(debug, -1); mac_dev = dpa_mac_probe(_of_dev); - if (IS_ERR(mac_dev)) { + if (IS_ERR(mac_dev) || !mac_dev) { err = PTR_ERR(mac_dev); goto mac_probe_failed; } diff --git a/drivers/net/ethernet/freescale/dpa/dpaa_eth_shared.c b/drivers/net/ethernet/freescale/dpa/dpaa_eth_shared.c index 3bb60e8..2b75b1e 100644 --- a/drivers/net/ethernet/freescale/dpa/dpaa_eth_shared.c +++ b/drivers/net/ethernet/freescale/dpa/dpaa_eth_shared.c @@ -647,7 +647,7 @@ dpaa_eth_shared_probe(struct platform_device *_of_dev) priv->msg_enable = netif_msg_init(debug, -1); mac_dev = dpa_mac_probe(_of_dev); - if (IS_ERR(mac_dev)) { + if (IS_ERR(mac_dev) || !mac_dev) { err = PTR_ERR(mac_dev); goto mac_probe_failed; } |