Commit 39096c0f authored by Dinghao Liu's avatar Dinghao Liu Committed by Greg Kroah-Hartman

drm/nouveau/dispnv50: fix runtime pm imbalance on error

[ Upstream commit dc455f4c ]

pm_runtime_get_sync() increments the runtime PM usage counter even
the call returns an error code. Thus a pairing decrement is needed
on the error handling path to keep the counter balanced.
Signed-off-by: default avatarDinghao Liu <dinghao.liu@zju.edu.cn>
Signed-off-by: default avatarBen Skeggs <bskeggs@redhat.com>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent 12f61a92
...@@ -909,8 +909,10 @@ nv50_mstc_detect(struct drm_connector *connector, bool force) ...@@ -909,8 +909,10 @@ nv50_mstc_detect(struct drm_connector *connector, bool force)
return connector_status_disconnected; return connector_status_disconnected;
ret = pm_runtime_get_sync(connector->dev->dev); ret = pm_runtime_get_sync(connector->dev->dev);
if (ret < 0 && ret != -EACCES) if (ret < 0 && ret != -EACCES) {
pm_runtime_put_autosuspend(connector->dev->dev);
return connector_status_disconnected; return connector_status_disconnected;
}
conn_status = drm_dp_mst_detect_port(connector, mstc->port->mgr, conn_status = drm_dp_mst_detect_port(connector, mstc->port->mgr,
mstc->port); mstc->port);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment