Merge "clk: qcom: clk-rpmh: Fix overflow in BCM vote"

This commit is contained in:
qctecmdr 2022-11-02 21:55:00 -07:00 committed by Gerrit - the friendly Code Review server
commit 0a87ecd6c9

View File

@ -310,6 +310,9 @@ static int clk_rpmh_bcm_send_cmd(struct clk_rpmh *c, bool enable)
cmd_state = 0;
}
if (cmd_state > BCM_TCS_CMD_VOTE_MASK)
cmd_state = BCM_TCS_CMD_VOTE_MASK;
if (c->last_sent_aggr_state != cmd_state) {
cmd.addr = c->res_addr;
cmd.data = BCM_TCS_CMD(1, enable, 0, cmd_state);