Skip to contentSkip to conversation

drm/nouveau/debugfs: fix pm_runtime.cocci warnings (fwd)

PATCH New Julia Lawall 1 participant 1 message Jul 28, 2018

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/nouveau/debugfs: fix pm_runtime.cocci warnings (fwd)

From: kbuild test robot <[email protected]>

pm_runtime_get_sync returns < 0 as error. Unecessary IS_ERR_VALUE at line 164

Generated by: scripts/coccinelle/api/pm_runtime.cocci

Fixes eaeb9010bb4b ("drm/nouveau/debugfs: Wake up GPU before doing any reclocking")
CC Karol Herbst <[email protected]>

---

Please take the patch only if it's a positive warning. Thanks!

 nouveau_debugfs.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/nouveau/nouveau_debugfs.c +1 -1
@@ -161,7 +161,7 @@ nouveau_debugfs_pstate_set(struct file *
 	}
 
 	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);

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel