Skip to content

Commit 909e9c9

Browse files
YueHaibingBen Skeggs
authored andcommitted
drm/nouveau/debugfs: Fix check of pm_runtime_get_sync failure
pm_runtime_get_sync returns negative on failure. Fixes: eaeb901 ("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>
1 parent 18ec3c1 commit 909e9c9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/gpu/drm/nouveau/nouveau_debugfs.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ nouveau_debugfs_pstate_set(struct file *file, const char __user *ubuf,
181181
}
182182

183183
ret = pm_runtime_get_sync(drm->dev);
184-
if (IS_ERR_VALUE(ret) && ret != -EACCES)
184+
if (ret < 0 && ret != -EACCES)
185185
return ret;
186186
ret = nvif_mthd(ctrl, NVIF_CONTROL_PSTATE_USER, &args, sizeof(args));
187187
pm_runtime_put_autosuspend(drm->dev);

0 commit comments

Comments
 (0)