Browse Source

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 <[email protected]>
Signed-off-by: Patrick Lai <[email protected]>
Vignesh Kulothungan 4 years ago
parent
commit
e334b71c41
1 changed files with 2 additions and 2 deletions
  1. 2 2
      dsp/audio_notifier.c

+ 2 - 2
dsp/audio_notifier.c

@@ -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);