Skip to content
Snippets Groups Projects
Commit 6d7860f5 authored by Jiasheng Jiang's avatar Jiasheng Jiang Committed by Bjorn Andersson
Browse files

soc: qcom: apr: Add check for idr_alloc and of_property_read_string_index


As idr_alloc() and of_property_read_string_index() can return negative
numbers, it should be better to check the return value and deal with
the exception.
Therefore, it should be better to use goto statement to stop and return
error.

Fixes: 6adba21e ("soc: qcom: Add APR bus driver")
Signed-off-by: default avatarJiasheng Jiang <jiasheng@iscas.ac.cn>
Reviewed-by: default avatarBjorn Andersson <andersson@kernel.org>
Signed-off-by: default avatarBjorn Andersson <andersson@kernel.org>
Link: https://lore.kernel.org/r/20221107014403.3606-1-jiasheng@iscas.ac.cn
parent 759dcdf2
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment