remoteproc: rcar_rproc: Fix pm_runtime_get_sync error check
pm_runtime_get_sync can also return 1 on success, change
to use pm_runtime_resume_and_get which return 0 only on
success.
This bug has been discovered by Dan Carpenter by using Smatch
static checker.
Fixes: 285892a74f
("remoteproc: Add Renesas rcar driver")
Signed-off-by: Julien Massot <julien.massot@iot.bzh>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
[Fixed blank line between tags]
Link: https://lore.kernel.org/r/20211216160653.203768-1-julien.massot@iot.bzh
Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org>
This commit is contained in:
parent
3bc0d1f9ef
commit
b0229605b1
|
@ -167,7 +167,7 @@ static int rcar_rproc_probe(struct platform_device *pdev)
|
|||
}
|
||||
|
||||
pm_runtime_enable(dev);
|
||||
ret = pm_runtime_get_sync(dev);
|
||||
ret = pm_runtime_resume_and_get(dev);
|
||||
if (ret) {
|
||||
dev_err(dev, "failed to power up\n");
|
||||
return ret;
|
||||
|
|
Loading…
Reference in New Issue