aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYueHaibing <yuehaibing@huawei.com>2019-02-28 20:24:59 +0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-04-20 09:17:02 +0200
commitd9fb98c921a89a178cfa36c8efcb675493644314 (patch)
treef46d0e76cd9b428f57e968cfd09494b30af36aa6
parentf0a085e99ff77b741130bcb26980472912968e4f (diff)
downloadlinux-yocto-d9fb98c921a89a178cfa36c8efcb675493644314.tar.gz
linux-yocto-d9fb98c921a89a178cfa36c8efcb675493644314.tar.bz2
linux-yocto-d9fb98c921a89a178cfa36c8efcb675493644314.zip
drm/nouveau/debugfs: Fix check of pm_runtime_get_sync failure
[ Upstream commit 909e9c9c428376e2a43d178ed4b0a2d5ba9cb7d3 ] pm_runtime_get_sync returns negative on failure. Fixes: eaeb9010bb4b ("drm/nouveau/debugfs: Wake up GPU before doing any reclocking") Signed-off-by: YueHaibing <yuehaibing@huawei.com> Signed-off-by: Ben Skeggs <bskeggs@redhat.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
-rw-r--r--drivers/gpu/drm/nouveau/nouveau_debugfs.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/nouveau/nouveau_debugfs.c b/drivers/gpu/drm/nouveau/nouveau_debugfs.c
index 88a52f6b39fe..7dfbbbc1beea 100644
--- a/drivers/gpu/drm/nouveau/nouveau_debugfs.c
+++ b/drivers/gpu/drm/nouveau/nouveau_debugfs.c
@@ -181,7 +181,7 @@ nouveau_debugfs_pstate_set(struct file *file, const char __user *ubuf,
}
ret = pm_runtime_get_sync(drm->dev);
- if (IS_ERR_VALUE(ret) && ret != -EACCES)
+ if (ret < 0 && ret != -EACCES)
return ret;
ret = nvif_mthd(ctrl, NVIF_CONTROL_PSTATE_USER, &args, sizeof(args));
pm_runtime_put_autosuspend(drm->dev);