Skip to content

Commit

Permalink
smsc911x: Do not use netdev_dbg() when device is not registered
Browse files Browse the repository at this point in the history
With debug enabled we get the following message:

smsc911x smsc911x (unregistered net_device): couldn't get clock -2

As the device has not been registered at this point, it is better to use
dev_dbg() instead of netdev_dbg().

CC: Sergei Shtylyov <[email protected]>

Suggested-by: Sergei Shtylyov <[email protected]>
Signed-off-by: Fabio Estevam <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
Fabio Estevam authored and davem330 committed Mar 26, 2014
1 parent cc93fc5 commit 1e87af9
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/net/ethernet/smsc/smsc911x.c
Original file line number Diff line number Diff line change
Expand Up @@ -439,7 +439,8 @@ static int smsc911x_request_resources(struct platform_device *pdev)
/* Request clock */
pdata->clk = clk_get(&pdev->dev, NULL);
if (IS_ERR(pdata->clk))
netdev_dbg(ndev, "couldn't get clock %li\n", PTR_ERR(pdata->clk));
dev_dbg(&pdev->dev, "couldn't get clock %li\n",
PTR_ERR(pdata->clk));

return ret;
}
Expand Down

0 comments on commit 1e87af9

Please sign in to comment.