mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git
synced 2026-04-25 00:52:45 -04:00
drm/omap: Fix runtime PM imbalance on error
pm_runtime_get_sync() increments the runtime PM usage counter even when it returns an error code. However, users of its direct wrappers in omapdrm assume that PM usage counter will not change on error. Thus a pairing decrement is needed on the error handling path for these wrappers to keep the counter balanced. Signed-off-by: Dinghao Liu <dinghao.liu@zju.edu.cn> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com> Link: https://patchwork.freedesktop.org/patch/msgid/20200822065743.13671-1-dinghao.liu@zju.edu.cn
This commit is contained in:
committed by
Tomi Valkeinen
parent
1b409fda60
commit
a5d704d332
@@ -653,8 +653,11 @@ int dispc_runtime_get(struct dispc_device *dispc)
|
||||
DSSDBG("dispc_runtime_get\n");
|
||||
|
||||
r = pm_runtime_get_sync(&dispc->pdev->dev);
|
||||
WARN_ON(r < 0);
|
||||
return r < 0 ? r : 0;
|
||||
if (WARN_ON(r < 0)) {
|
||||
pm_runtime_put_noidle(&dispc->pdev->dev);
|
||||
return r;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
void dispc_runtime_put(struct dispc_device *dispc)
|
||||
|
||||
Reference in New Issue
Block a user