From e50fd9b5794d68c6814114b3c575069bcdbcb409 Mon Sep 17 00:00:00 2001 From: Zhang Changzhong Date: Mon, 7 Sep 2020 21:02:03 +0800 Subject: 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 Signed-off-by: Zhang Changzhong Reviewed-by: Radhey Shyam Pandey Signed-off-by: Jakub Kicinski --- drivers/net/ethernet/xilinx/xilinx_axienet_main.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'drivers/net/ethernet/xilinx/xilinx_axienet_main.c') 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; -- cgit v1.2.3