Skip to content

Commit 599d41f

Browse files
stephan-ghandersson
authored andcommitted
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: 6d7860f ("soc: qcom: apr: Add check for idr_alloc and of_property_read_string_index") Signed-off-by: Stephan Gerhold <[email protected]> Reviewed-by: Bjorn Andersson <[email protected]> Signed-off-by: Bjorn Andersson <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent 2665886 commit 599d41f

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

drivers/soc/qcom/apr.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -461,9 +461,10 @@ static int apr_add_device(struct device *dev, struct device_node *np,
461461
goto out;
462462
}
463463

464+
/* Protection domain is optional, it does not exist on older platforms */
464465
ret = of_property_read_string_index(np, "qcom,protection-domain",
465466
1, &adev->service_path);
466-
if (ret < 0) {
467+
if (ret < 0 && ret != -EINVAL) {
467468
dev_err(dev, "Failed to read second value of qcom,protection-domain\n");
468469
goto out;
469470
}

0 commit comments

Comments
 (0)