Skip to content

Commit b022960

Browse files
Julien Massotmathieupoirier
authored andcommitted
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: 285892a ("remoteproc: Add Renesas rcar driver") Signed-off-by: Julien Massot <[email protected]> Reviewed-by: Geert Uytterhoeven <[email protected]> [Fixed blank line between tags] Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mathieu Poirier <[email protected]>
1 parent 3bc0d1f commit b022960

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/remoteproc/rcar_rproc.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ static int rcar_rproc_probe(struct platform_device *pdev)
167167
}
168168

169169
pm_runtime_enable(dev);
170-
ret = pm_runtime_get_sync(dev);
170+
ret = pm_runtime_resume_and_get(dev);
171171
if (ret) {
172172
dev_err(dev, "failed to power up\n");
173173
return ret;

0 commit comments

Comments
 (0)