diff options
Diffstat (limited to 'drivers/net/ethernet/renesas/sh_eth.c')
-rw-r--r-- | drivers/net/ethernet/renesas/sh_eth.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/net/ethernet/renesas/sh_eth.c b/drivers/net/ethernet/renesas/sh_eth.c index 339b2eae2100..e33af371b169 100644 --- a/drivers/net/ethernet/renesas/sh_eth.c +++ b/drivers/net/ethernet/renesas/sh_eth.c | |||
@@ -3181,12 +3181,16 @@ static struct sh_eth_plat_data *sh_eth_parse_dt(struct device *dev) | |||
3181 | struct device_node *np = dev->of_node; | 3181 | struct device_node *np = dev->of_node; |
3182 | struct sh_eth_plat_data *pdata; | 3182 | struct sh_eth_plat_data *pdata; |
3183 | const char *mac_addr; | 3183 | const char *mac_addr; |
3184 | int ret; | ||
3184 | 3185 | ||
3185 | pdata = devm_kzalloc(dev, sizeof(*pdata), GFP_KERNEL); | 3186 | pdata = devm_kzalloc(dev, sizeof(*pdata), GFP_KERNEL); |
3186 | if (!pdata) | 3187 | if (!pdata) |
3187 | return NULL; | 3188 | return NULL; |
3188 | 3189 | ||
3189 | pdata->phy_interface = of_get_phy_mode(np); | 3190 | ret = of_get_phy_mode(np); |
3191 | if (ret < 0) | ||
3192 | return NULL; | ||
3193 | pdata->phy_interface = ret; | ||
3190 | 3194 | ||
3191 | mac_addr = of_get_mac_address(np); | 3195 | mac_addr = of_get_mac_address(np); |
3192 | if (mac_addr) | 3196 | if (mac_addr) |