ASoC: fsl: using pm_runtime_resume_and_get instead of pm_runtime_get_sync

Using pm_runtime_resume_and_get is more appropriate
for simplifing code

Reported-by: Zeal Robot <zealci@zte.com.cn>
Signed-off-by: Minghao Chi <chi.minghao@zte.com.cn>
Acked-by: Shengjiu Wang <shengjiu.wang@gmail.com>
Link: https://lore.kernel.org/r/20220412083000.2532711-1-chi.minghao@zte.com.cn
Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
Minghao Chi 2022-04-12 08:30:00 +00:00 committed by Mark Brown
parent 5068406006
commit c721905c54
No known key found for this signature in database
GPG key ID: 24D68B725D5487D0

View file

@ -1050,11 +1050,9 @@ static int fsl_esai_probe(struct platform_device *pdev)
goto err_pm_disable;
}
ret = pm_runtime_get_sync(&pdev->dev);
if (ret < 0) {
pm_runtime_put_noidle(&pdev->dev);
ret = pm_runtime_resume_and_get(&pdev->dev);
if (ret < 0)
goto err_pm_get_sync;
}
ret = fsl_esai_hw_init(esai_priv);
if (ret)