From: Dinghao Liu Date: Fri, 22 May 2020 13:41:09 +0000 (+0800) Subject: drm/panfrost: Fix runtime PM imbalance on error X-Git-Tag: v5.9-rc1~134^2~21^2~1 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=64092598c4566dc80a71ca57396dc36fdbf3da4b;p=thirdparty%2Fkernel%2Flinux.git drm/panfrost: Fix runtime PM imbalance on error The caller expects panfrost_job_hw_submit() to increase runtime PM usage counter. The refcount decrement on the error branch of WARN_ON() will break the counter balance and needs to be removed. Signed-off-by: Dinghao Liu Reviewed-by: Steven Price Signed-off-by: Steven Price Link: https://patchwork.freedesktop.org/patch/msgid/20200522134109.27204-1-dinghao.liu@zju.edu.cn --- diff --git a/drivers/gpu/drm/panfrost/panfrost_job.c b/drivers/gpu/drm/panfrost/panfrost_job.c index ac87ef675e8a8..360146f6f3d9d 100644 --- a/drivers/gpu/drm/panfrost/panfrost_job.c +++ b/drivers/gpu/drm/panfrost/panfrost_job.c @@ -152,7 +152,6 @@ static void panfrost_job_hw_submit(struct panfrost_job *job, int js) return; if (WARN_ON(job_read(pfdev, JS_COMMAND_NEXT(js)))) { - pm_runtime_put_sync_autosuspend(pfdev->dev); return; }