Skip to content

Commit dc455f4

Browse files
dinghaoliuBen Skeggs
authored andcommitted
drm/nouveau/dispnv50: fix runtime pm imbalance on error
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: Dinghao Liu <[email protected]> Signed-off-by: Ben Skeggs <[email protected]>
1 parent d3faddc commit dc455f4

File tree

1 file changed

+3
-1
lines changed
  • drivers/gpu/drm/nouveau/dispnv50

1 file changed

+3
-1
lines changed

drivers/gpu/drm/nouveau/dispnv50/disp.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1137,8 +1137,10 @@ nv50_mstc_detect(struct drm_connector *connector,
11371137
return connector_status_disconnected;
11381138

11391139
ret = pm_runtime_get_sync(connector->dev->dev);
1140-
if (ret < 0 && ret != -EACCES)
1140+
if (ret < 0 && ret != -EACCES) {
1141+
pm_runtime_put_autosuspend(connector->dev->dev);
11411142
return connector_status_disconnected;
1143+
}
11421144

11431145
ret = drm_dp_mst_detect_port(connector, ctx, mstc->port->mgr,
11441146
mstc->port);

0 commit comments

Comments
 (0)