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 <dinghao.liu@zju.edu.cn>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
                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;
+       }
 
        ret = drm_dp_mst_detect_port(connector, ctx, mstc->port->mgr,
                                     mstc->port);