diff options
author | David S. Miller <davem@davemloft.net> | 2019-03-28 03:37:58 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2019-03-28 03:37:58 +0300 |
commit | 356d71e00d278d865f8c7f68adebd6ce4698a7e2 (patch) | |
tree | 8cb2dabf7440b56c6dee76b4253210c6b603b98e /drivers/net/ethernet/cadence | |
parent | df453700e8d81b1bdafdf684365ee2b9431fb702 (diff) | |
parent | 1a9df9e29c2afecf6e3089442d429b377279ca3c (diff) | |
download | linux-356d71e00d278d865f8c7f68adebd6ce4698a7e2.tar.xz |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Diffstat (limited to 'drivers/net/ethernet/cadence')
-rw-r--r-- | drivers/net/ethernet/cadence/macb_main.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/drivers/net/ethernet/cadence/macb_main.c b/drivers/net/ethernet/cadence/macb_main.c index 98c2352b1b83..a44171fddf47 100644 --- a/drivers/net/ethernet/cadence/macb_main.c +++ b/drivers/net/ethernet/cadence/macb_main.c @@ -3370,14 +3370,20 @@ static int macb_clk_init(struct platform_device *pdev, struct clk **pclk, *hclk = devm_clk_get(&pdev->dev, "hclk"); } - if (IS_ERR(*pclk)) { + if (IS_ERR_OR_NULL(*pclk)) { err = PTR_ERR(*pclk); + if (!err) + err = -ENODEV; + dev_err(&pdev->dev, "failed to get macb_clk (%u)\n", err); return err; } - if (IS_ERR(*hclk)) { + if (IS_ERR_OR_NULL(*hclk)) { err = PTR_ERR(*hclk); + if (!err) + err = -ENODEV; + dev_err(&pdev->dev, "failed to get hclk (%u)\n", err); return err; } |