From: Zhang Changzhong Date: Mon, 7 Sep 2020 13:02:03 +0000 (+0800) Subject: net: xilinx: remove redundant null check before clk_disable_unprepare() X-Git-Tag: v5.10-rc1~107^2~358 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=e50fd9b5794d68c6814114b3c575069bcdbcb409;p=thirdparty%2Fkernel%2Flinux.git 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 --- diff --git a/drivers/net/ethernet/xilinx/xilinx_axienet_main.c b/drivers/net/ethernet/xilinx/xilinx_axienet_main.c index fa5dc2993520e..9aafd3ecdaa4d 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;