summaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/synopsys/dwc_eth_qos.c
diff options
context:
space:
mode:
authorMarkus Elfring <elfring@users.sourceforge.net>2015-11-07 16:30:34 +0100
committerDavid S. Miller <davem@davemloft.net>2015-11-07 13:17:32 -0500
commit3694bfbdb3bd5cf6632140c7f7fdf6f31d43ee66 (patch)
treee36c618911cd85187001e3812654646feb964fc5 /drivers/net/ethernet/synopsys/dwc_eth_qos.c
parent40baec225765c54eefa870530dd613bad9829bb7 (diff)
downloadlwn-3694bfbdb3bd5cf6632140c7f7fdf6f31d43ee66.tar.gz
lwn-3694bfbdb3bd5cf6632140c7f7fdf6f31d43ee66.zip
dwc_eth_qos: Delete an unnecessary check before the function call "of_node_put"
The of_node_put() function tests whether its argument is NULL and then returns immediately. Thus the test around the call is not needed. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring <elfring@users.sourceforge.net> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/synopsys/dwc_eth_qos.c')
-rw-r--r--drivers/net/ethernet/synopsys/dwc_eth_qos.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/net/ethernet/synopsys/dwc_eth_qos.c b/drivers/net/ethernet/synopsys/dwc_eth_qos.c
index 85b3326775b8..9066d7a8483c 100644
--- a/drivers/net/ethernet/synopsys/dwc_eth_qos.c
+++ b/drivers/net/ethernet/synopsys/dwc_eth_qos.c
@@ -2970,8 +2970,7 @@ err_out_unregister_netdev:
err_out_clk_dis_aper:
clk_disable_unprepare(lp->apb_pclk);
err_out_free_netdev:
- if (lp->phy_node)
- of_node_put(lp->phy_node);
+ of_node_put(lp->phy_node);
free_netdev(ndev);
platform_set_drvdata(pdev, NULL);
return ret;