clk: qcom: clk-rpmh: Remove redundant if statement
authorLi Zhengyu <lizhengyu3@huawei.com>
Mon, 13 Jun 2022 06:33:27 +0000 (14:33 +0800)
committerBjorn Andersson <andersson@kernel.org>
Wed, 14 Sep 2022 02:54:13 +0000 (21:54 -0500)
By the clk framework already reference counts prepare/unprepare,
this if statement should be never true.

Signed-off-by: Li Zhengyu <lizhengyu3@huawei.com>
Reviewed-by: Stephen Boyd <sboyd@kernel.org>
Link: https://lore.kernel.org/r/20220613063327.89320-1-lizhengyu3@huawei.com
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
drivers/clk/qcom/clk-rpmh.c

index c07cab6..9739aab 100644 (file)
@@ -195,10 +195,6 @@ static int clk_rpmh_aggregate_state_send_command(struct clk_rpmh *c,
 {
        int ret;
 
-       /* Nothing required to be done if already off or on */
-       if (enable == c->state)
-               return 0;
-
        c->state = enable ? c->valid_state_mask : 0;
        c->aggr_state = c->state | c->peer->state;
        c->peer->aggr_state = c->aggr_state;