[PATCH] clk: qcom: clk-rpmh: Remove redundant if statement

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



(!ret) has been checked, so remove (ret).

Signed-off-by: Li Zhengyu <lizhengyu3@xxxxxxxxxx>
---
 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




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [Linux for Sparc]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux