summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZhang Changzhong <zhangchangzhong@huawei.com>2020-09-09 22:06:37 +0800
committerDavid S. Miller <davem@davemloft.net>2020-09-09 14:16:33 -0700
commita0d48518cdc855ed188be385abb4df1752a4003c (patch)
treeecbfd342658c021c6c003318b63c0bb91f74b154
parent34e435438cbc81109c8a9b541a4581842a5dd352 (diff)
net: pxa168_eth: remove redundant null check before clk_disable_unprepare()
Because clk_prepare_enable() and clk_disable_unprepare() already checked NULL clock parameter, so the additional checks are unnecessary, just remove them. Reported-by: Hulk Robot <hulkci@huawei.com> Signed-off-by: Zhang Changzhong <zhangchangzhong@huawei.com> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--drivers/net/ethernet/marvell/pxa168_eth.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/net/ethernet/marvell/pxa168_eth.c b/drivers/net/ethernet/marvell/pxa168_eth.c
index eb8cf60ecf12..faac94b2d5ff 100644
--- a/drivers/net/ethernet/marvell/pxa168_eth.c
+++ b/drivers/net/ethernet/marvell/pxa168_eth.c
@@ -1541,10 +1541,8 @@ static int pxa168_eth_remove(struct platform_device *pdev)
}
if (dev->phydev)
phy_disconnect(dev->phydev);
- if (pep->clk) {
- clk_disable_unprepare(pep->clk);
- }
+ clk_disable_unprepare(pep->clk);
mdiobus_unregister(pep->smi_bus);
mdiobus_free(pep->smi_bus);
unregister_netdev(dev);