diff options
author | Julia Lawall <Julia.Lawall@lip6.fr> | 2014-08-08 14:07:54 +0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-08-08 21:28:08 +0400 |
commit | f8e8be1c1ee67801d26f0d1e9548b59cbf607bf1 (patch) | |
tree | c614874d23ae0216f921d9bdc4b697f403ff7b78 /drivers/net/ethernet/freescale/fec_mpc52xx.c | |
parent | 6a3e6aa10bf516c5c507292489e4d1fddeb2901b (diff) | |
download | linux-f8e8be1c1ee67801d26f0d1e9548b59cbf607bf1.tar.xz |
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/ethernet/freescale/fec_mpc52xx.c')
-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) unregister_netdev(ndev); - if (priv->phy_node) - of_node_put(priv->phy_node); + of_node_put(priv->phy_node); priv->phy_node = NULL; irq_dispose_mapping(ndev->irq); |