soc: qcom: pdr: Remove impossible error condition
The patch fbe639b44a82: "soc: qcom: Introduce Protection Domain Restart helpers" leads to the following static checker warning: drivers/soc/qcom/pdr_interface.c:158 pdr_register_listener() '(resp.curr_state < (-((~0 >> 1)) - 1)) => (s32min-s32max < s32min)' These are casted to int so they can't be outside of int range. Fixes: fbe639b44a82 ("soc: qcom: Introduce Protection Domain Restart helpers") Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Sibi Sankar <sibis@codeaurora.org> Link: https://lore.kernel.org/r/20200415062955.21439-1-sibis@codeaurora.org Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
This commit is contained in:
parent
35bb4b22f6
commit
02d8ecc18b
@ -155,10 +155,6 @@ static int pdr_register_listener(struct pdr_handle *pdr,
|
||||
return ret;
|
||||
}
|
||||
|
||||
if ((int)resp.curr_state < INT_MIN || (int)resp.curr_state > INT_MAX)
|
||||
pr_err("PDR: %s notification state invalid: 0x%x\n",
|
||||
pds->service_path, resp.curr_state);
|
||||
|
||||
pds->state = resp.curr_state;
|
||||
|
||||
return 0;
|
||||
|
Loading…
x
Reference in New Issue
Block a user