dsp: probe defer when remoteproc is uninitialized

There can be race condition that audio_notifier probe
function is called before remoteproc-adsp driver instance
is initialized. In such case, NULL handle would be returned.
It should not be treated as unrecovery error. Update return
status to EPROBE_DEFER upon getting NULL handle back from remoteproc

Change-Id: Id9d182949d12923a25b582142e3fe8bad85e19de
Signed-off-by: Vignesh Kulothungan <vigneshk@codeaurora.org>
Signed-off-by: Patrick Lai <plai@codeaurora.org>
This commit is contained in:
Vignesh Kulothungan
2021-04-05 13:40:07 -07:00
committed by Patrick Lai
parent 1167850c11
commit e334b71c41

View File

@@ -626,13 +626,13 @@ static int audio_notify_probe(struct platform_device *pdev)
priv->rproc_h = rproc_get_by_phandle(rproc_phandle);
if (!priv->rproc_h) {
dev_err(&pdev->dev, "remotproc handle NULL\n");
dev_info_ratelimited(&pdev->dev, "remotproc handle NULL\n");
ret = -EPROBE_DEFER;
return ret;
}
adsp_private = pdev;
audio_notifier_subsys_init();
audio_notifier_init_service(AUDIO_NOTIFIER_PDR_SERVICE);