Skip to content

Commit 02d8ecc

Browse files
Sibi Sankarandersson
authored andcommitted
soc: qcom: pdr: Remove impossible error condition
The patch fbe639b: "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: fbe639b ("soc: qcom: Introduce Protection Domain Restart helpers") Reported-by: Dan Carpenter <[email protected]> Signed-off-by: Sibi Sankar <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Bjorn Andersson <[email protected]>
1 parent 35bb4b2 commit 02d8ecc

File tree

1 file changed

+0
-4
lines changed

1 file changed

+0
-4
lines changed

drivers/soc/qcom/pdr_interface.c

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -155,10 +155,6 @@ static int pdr_register_listener(struct pdr_handle *pdr,
155155
return ret;
156156
}
157157

158-
if ((int)resp.curr_state < INT_MIN || (int)resp.curr_state > INT_MAX)
159-
pr_err("PDR: %s notification state invalid: 0x%x\n",
160-
pds->service_path, resp.curr_state);
161-
162158
pds->state = resp.curr_state;
163159

164160
return 0;

0 commit comments

Comments
 (0)