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:

committed by
Patrick Lai

parent
1167850c11
commit
e334b71c41
@@ -626,13 +626,13 @@ static int audio_notify_probe(struct platform_device *pdev)
|
|||||||
|
|
||||||
priv->rproc_h = rproc_get_by_phandle(rproc_phandle);
|
priv->rproc_h = rproc_get_by_phandle(rproc_phandle);
|
||||||
if (!priv->rproc_h) {
|
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;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
adsp_private = pdev;
|
adsp_private = pdev;
|
||||||
|
|
||||||
|
|
||||||
audio_notifier_subsys_init();
|
audio_notifier_subsys_init();
|
||||||
|
|
||||||
audio_notifier_init_service(AUDIO_NOTIFIER_PDR_SERVICE);
|
audio_notifier_init_service(AUDIO_NOTIFIER_PDR_SERVICE);
|
||||||
|
Reference in New Issue
Block a user