ath10k: remove useless test before clk_disable_unprepare
authorYueHaibing <yuehaibing@huawei.com>
Wed, 23 May 2018 08:14:17 +0000 (11:14 +0300)
committerKalle Valo <kvalo@codeaurora.org>
Fri, 25 May 2018 10:02:56 +0000 (13:02 +0300)
clk_disable_unprepare() already checks that the clock pointer is valid.
No need to test it before calling it.

Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
drivers/net/wireless/ath/ath10k/ahb.c

index 35d1049..fa39fff 100644 (file)
@@ -180,14 +180,11 @@ static void ath10k_ahb_clock_disable(struct ath10k *ar)
 {
        struct ath10k_ahb *ar_ahb = ath10k_ahb_priv(ar);
 
-       if (!IS_ERR_OR_NULL(ar_ahb->cmd_clk))
-               clk_disable_unprepare(ar_ahb->cmd_clk);
+       clk_disable_unprepare(ar_ahb->cmd_clk);
 
-       if (!IS_ERR_OR_NULL(ar_ahb->ref_clk))
-               clk_disable_unprepare(ar_ahb->ref_clk);
+       clk_disable_unprepare(ar_ahb->ref_clk);
 
-       if (!IS_ERR_OR_NULL(ar_ahb->rtc_clk))
-               clk_disable_unprepare(ar_ahb->rtc_clk);
+       clk_disable_unprepare(ar_ahb->rtc_clk);
 }
 
 static int ath10k_ahb_rst_ctrl_init(struct ath10k *ar)