提交 b458925e 编写于 作者: Z zhong jiang 提交者: 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: Nzhong jiang <zhongjiang@huawei.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 1ddc5d3e
......@@ -392,8 +392,7 @@ static void dsa_of_free_platform_data(struct dsa_platform_data *pd)
}
/* 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);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册