drm/nouveau: fix runtime pm imbalance on error
authorDinghao Liu <dinghao.liu@zju.edu.cn>
Wed, 20 May 2020 10:36:04 +0000 (18:36 +0800)
committerBen Skeggs <bskeggs@redhat.com>
Fri, 22 May 2020 01:13:52 +0000 (11:13 +1000)
commitd3faddc7dcd326c0edc906f907f83a8454986d99
treeb0518436d57b44f512c436444965daac0d1c6417
parentd7372dfb3f7f1602b87e0663e8b8646da23ebca7
drm/nouveau: 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 <dinghao.liu@zju.edu.cn>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
drivers/gpu/drm/nouveau/nouveau_gem.c