[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20220531085611.122884-1-lizhengyu3@huawei.com>
Date: Tue, 31 May 2022 16:56:11 +0800
From: Li Zhengyu <lizhengyu3@...wei.com>
To: <tdas@...eaurora.org>
CC: <bjorn.andersson@...aro.org>, <agross@...nel.org>,
<mturquette@...libre.com>, <sboyd@...nel.org>,
<linux-arm-msm@...r.kernel.org>, <linux-clk@...r.kernel.org>,
<linux-kernel@...r.kernel.org>
Subject: [PATCH] clk: qcom: clk-rpmh: Remove redundant if statement
(!ret) has been checked, so remove (ret).
Signed-off-by: Li Zhengyu <lizhengyu3@...wei.com>
---
drivers/clk/qcom/clk-rpmh.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/drivers/clk/qcom/clk-rpmh.c b/drivers/clk/qcom/clk-rpmh.c
index aed907982344..6d207f7e943d 100644
--- a/drivers/clk/qcom/clk-rpmh.c
+++ b/drivers/clk/qcom/clk-rpmh.c
@@ -207,10 +207,7 @@ static int clk_rpmh_aggregate_state_send_command(struct clk_rpmh *c,
if (!ret)
return 0;
- if (ret && enable)
- c->state = 0;
- else if (ret)
- c->state = c->valid_state_mask;
+ c->state = enable ? 0 : c->valid_state_mask;
WARN(1, "clk: %s failed to %s\n", c->res_name,
enable ? "enable" : "disable");
--
2.17.1
Powered by blists - more mailing lists