diff options
Diffstat (limited to 'drivers/net/ethernet/freescale/dpa/dpaa_eth_sysfs.c')
-rw-r--r-- | drivers/net/ethernet/freescale/dpa/dpaa_eth_sysfs.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/net/ethernet/freescale/dpa/dpaa_eth_sysfs.c b/drivers/net/ethernet/freescale/dpa/dpaa_eth_sysfs.c index 413f27f..1a75354 100644 --- a/drivers/net/ethernet/freescale/dpa/dpaa_eth_sysfs.c +++ b/drivers/net/ethernet/freescale/dpa/dpaa_eth_sysfs.c @@ -143,7 +143,10 @@ static ssize_t dpaa_eth_show_mac_regs(struct device *dev, struct dpa_priv_s *priv = netdev_priv(to_net_dev(dev)); struct mac_device *mac_dev = priv->mac_dev; - fm_mac_dump_regs(mac_dev); + if (mac_dev) + fm_mac_dump_regs(mac_dev); + else + return sprintf(buf, "no mac registers\n"); return 0; } |