aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/xilinx
diff options
context:
space:
mode:
authorZhang Changzhong <zhangchangzhong@huawei.com>2020-09-07 21:02:03 +0800
committerJakub Kicinski <kuba@kernel.org>2020-09-07 13:34:14 -0700
commite50fd9b5794d68c6814114b3c575069bcdbcb409 (patch)
treef7b5de3c775ed98d591c8ed1495378eba619d9ce /drivers/net/ethernet/xilinx
parentMerge branch 'net-bridge-mcast-initial-IGMPv3-MLDv2-support-part-1' (diff)
downloadlinux-dev-e50fd9b5794d68c6814114b3c575069bcdbcb409.tar.xz
linux-dev-e50fd9b5794d68c6814114b3c575069bcdbcb409.zip
net: xilinx: 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> Reviewed-by: Radhey Shyam Pandey <radhey.shyam.pandey@xilinx.com> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'drivers/net/ethernet/xilinx')
-rw-r--r--drivers/net/ethernet/xilinx/xilinx_axienet_main.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/net/ethernet/xilinx/xilinx_axienet_main.c b/drivers/net/ethernet/xilinx/xilinx_axienet_main.c
index fa5dc2993520..9aafd3ecdaa4 100644
--- a/drivers/net/ethernet/xilinx/xilinx_axienet_main.c
+++ b/drivers/net/ethernet/xilinx/xilinx_axienet_main.c
@@ -2038,8 +2038,7 @@ static int axienet_remove(struct platform_device *pdev)
axienet_mdio_teardown(lp);
- if (lp->clk)
- clk_disable_unprepare(lp->clk);
+ clk_disable_unprepare(lp->clk);
of_node_put(lp->phy_node);
lp->phy_node = NULL;