diff options
author | YueHaibing <yuehaibing@huawei.com> | 2018-05-23 11:14:17 +0300 |
---|---|---|
committer | Kalle Valo <kvalo@codeaurora.org> | 2018-05-25 13:02:56 +0300 |
commit | cf3c0ae6a32b5c3bb19b07d48dff646fc3896e51 (patch) | |
tree | 7bd256b1aefcbd63b20a49c2fda9bbe33d0f1fb2 | |
parent | f1abff21acc5c21bfba472c74d76f4430d06bdd3 (diff) | |
download | linux-cf3c0ae6a32b5c3bb19b07d48dff646fc3896e51.tar.gz linux-cf3c0ae6a32b5c3bb19b07d48dff646fc3896e51.tar.bz2 linux-cf3c0ae6a32b5c3bb19b07d48dff646fc3896e51.zip |
ath10k: remove useless test before clk_disable_unprepare
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>
-rw-r--r-- | drivers/net/wireless/ath/ath10k/ahb.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/drivers/net/wireless/ath/ath10k/ahb.c b/drivers/net/wireless/ath/ath10k/ahb.c index 35d10490f6c3..fa39ffffd34d 100644 --- a/drivers/net/wireless/ath/ath10k/ahb.c +++ b/drivers/net/wireless/ath/ath10k/ahb.c @@ -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) |