soc: qcom: apr: Make qcom,protection-domain optional again
authorStephan Gerhold <stephan@gerhold.net>
Thu, 29 Dec 2022 15:16:48 +0000 (16:16 +0100)
committerBjorn Andersson <andersson@kernel.org>
Fri, 6 Jan 2023 17:51:19 +0000 (11:51 -0600)
commit599d41fb8ea8bd2a99ca9525dd69405020e43dda
tree9987c363b3dd9b485b4491ccb53a38f9d92abd1a
parent26658868354963afbff672ad6f7a85c44c311975
soc: qcom: apr: Make qcom,protection-domain optional again

APR should not fail if the service device tree node does not have
the qcom,protection-domain property, since this functionality does
not exist on older platforms such as MSM8916 and MSM8996.

Ignore -EINVAL (returned when the property does not exist) to fix
a regression on 6.2-rc1 that prevents audio from working:

  qcom,apr remoteproc0:smd-edge.apr_audio_svc.-1.-1:
    Failed to read second value of qcom,protection-domain
  qcom,apr remoteproc0:smd-edge.apr_audio_svc.-1.-1:
    Failed to add apr 3 svc

Fixes: 6d7860f5750d ("soc: qcom: apr: Add check for idr_alloc and of_property_read_string_index")
Signed-off-by: Stephan Gerhold <stephan@gerhold.net>
Reviewed-by: Bjorn Andersson <andersson@kernel.org>
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
Link: https://lore.kernel.org/r/20221229151648.19839-3-stephan@gerhold.net
drivers/soc/qcom/apr.c