The pm_runtime_resume_and_get() returns 1 if RPM is active, in this case it won't call a put. This will result in PM imbalance as it treat this as an error and propagate this to caller and the caller never calls corresponding put(). Fix this issue by checking error condition only. Signed-off-by: Biju Das <biju.das.jz@xxxxxxxxxxxxxx> --- drivers/remoteproc/rcar_rproc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/remoteproc/rcar_rproc.c b/drivers/remoteproc/rcar_rproc.c index cc17e8421f65..3373a74d8b3a 100644 --- a/drivers/remoteproc/rcar_rproc.c +++ b/drivers/remoteproc/rcar_rproc.c @@ -174,7 +174,7 @@ static int rcar_rproc_probe(struct platform_device *pdev) pm_runtime_enable(dev); ret = pm_runtime_resume_and_get(dev); - if (ret) { + if (ret < 0) { dev_err(dev, "failed to power up\n"); return ret; } -- 2.43.0