Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

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

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



[ Upstream commit dc455f4c888365595c0a13da445e092422d55b8d ]

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
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -909,8 +909,10 @@ nv50_mstc_detect(struct drm_connector *connector, bool force)
		return connector_status_disconnected;

	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;
	}

	conn_status = drm_dp_mst_detect_port(connector, mstc->port->mgr,
					     mstc->port);