summaryrefslogtreecommitdiffstats
path: root/drivers/soc
diff options
context:
space:
mode:
authorStephan Gerhold <stephan@gerhold.net>2022-12-29 16:16:48 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2023-01-24 07:24:44 +0100
commitebb677d219453f29cec0ca60b73f8397b0d8eb67 (patch)
treedf03bad67ea3cf5fd0dff2993f002b06870259c2 /drivers/soc
parenteffecd8d116d3d3a28b4f628e61bba8d318fdfcf (diff)
downloadlinux-stable-ebb677d219453f29cec0ca60b73f8397b0d8eb67.tar.gz
linux-stable-ebb677d219453f29cec0ca60b73f8397b0d8eb67.tar.bz2
linux-stable-ebb677d219453f29cec0ca60b73f8397b0d8eb67.zip
soc: qcom: apr: Make qcom,protection-domain optional again
commit 599d41fb8ea8bd2a99ca9525dd69405020e43dda upstream. 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 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/soc')
-rw-r--r--drivers/soc/qcom/apr.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/soc/qcom/apr.c b/drivers/soc/qcom/apr.c
index cd44f17dad3d..d51abb462ae5 100644
--- a/drivers/soc/qcom/apr.c
+++ b/drivers/soc/qcom/apr.c
@@ -461,9 +461,10 @@ static int apr_add_device(struct device *dev, struct device_node *np,
goto out;
}
+ /* Protection domain is optional, it does not exist on older platforms */
ret = of_property_read_string_index(np, "qcom,protection-domain",
1, &adev->service_path);
- if (ret < 0) {
+ if (ret < 0 && ret != -EINVAL) {
dev_err(dev, "Failed to read second value of qcom,protection-domain\n");
goto out;
}