]> git.baikalelectronics.ru Git - kernel.git/commit
remoteproc: rcar_rproc: Fix pm_runtime_get_sync error check
authorJulien Massot <julien.massot@iot.bzh>
Thu, 16 Dec 2021 16:06:53 +0000 (17:06 +0100)
committerMathieu Poirier <mathieu.poirier@linaro.org>
Mon, 20 Dec 2021 16:33:16 +0000 (09:33 -0700)
commitc4ceb23781288d57e895999366dd4819b3bdd34b
tree134f559c46f64daa5fa12d686298b5b9a6624593
parentd61babd53e00288ae7eb59507c22a7dfcb5fa589
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: 2359890cc4dd ("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>
drivers/remoteproc/rcar_rproc.c