diff options
author | Julia Lawall <Julia.Lawall@lip6.fr> | 2014-08-08 06:07:54 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-08-08 13:28:08 -0400 |
commit | f8e8be1c1ee67801d26f0d1e9548b59cbf607bf1 (patch) | |
tree | c614874d23ae0216f921d9bdc4b697f403ff7b78 /drivers/net | |
parent | 6a3e6aa10bf516c5c507292489e4d1fddeb2901b (diff) |
fec_mpc52xx: delete unneeded test before of_node_put
Of_node_put supports NULL as its argument, so the initial test is not
necessary.
Suggested by Uwe Kleine-König.
The semantic patch that fixes this problem is as follows:
(http://coccinelle.lip6.fr/)
// <smpl>
@@
expression e;
@@
-if (e)
of_node_put(e);
// </smpl>
Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/ethernet/freescale/fec_mpc52xx.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/net/ethernet/freescale/fec_mpc52xx.c b/drivers/net/ethernet/freescale/fec_mpc52xx.c index 9947765e90c5..ff55fbb20a75 100644 --- a/drivers/net/ethernet/freescale/fec_mpc52xx.c +++ b/drivers/net/ethernet/freescale/fec_mpc52xx.c | |||
@@ -1015,8 +1015,7 @@ mpc52xx_fec_remove(struct platform_device *op) | |||
1015 | 1015 | ||
1016 | unregister_netdev(ndev); | 1016 | unregister_netdev(ndev); |
1017 | 1017 | ||
1018 | if (priv->phy_node) | 1018 | of_node_put(priv->phy_node); |
1019 | of_node_put(priv->phy_node); | ||
1020 | priv->phy_node = NULL; | 1019 | priv->phy_node = NULL; |
1021 | 1020 | ||
1022 | irq_dispose_mapping(ndev->irq); | 1021 | irq_dispose_mapping(ndev->irq); |