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: NJiasheng Jiang <jiasheng@iscas.ac.cn> Reviewed-by: NBjorn Andersson <andersson@kernel.org> Signed-off-by: NBjorn Andersson <andersson@kernel.org> Link: https://lore.kernel.org/r/20221107014403.3606-1-jiasheng@iscas.ac.cn
Showing
想要评论请 注册 或 登录