Commit b458925e authored by zhong jiang's avatar zhong jiang Committed by David S. Miller

net: dsa: remove redundant null pointer check before put_device

put_device has taken the null pinter check into account. So it is
safe to remove the duplicated check before put_device.
Signed-off-by: default avatarzhong jiang <zhongjiang@huawei.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 1ddc5d3e
...@@ -392,7 +392,6 @@ static void dsa_of_free_platform_data(struct dsa_platform_data *pd) ...@@ -392,7 +392,6 @@ static void dsa_of_free_platform_data(struct dsa_platform_data *pd)
} }
/* Drop our reference to the MDIO bus device */ /* Drop our reference to the MDIO bus device */
if (pd->chip[i].host_dev)
put_device(pd->chip[i].host_dev); put_device(pd->chip[i].host_dev);
} }
kfree(pd->chip); kfree(pd->chip);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment