zhong jiang
2018-Aug-04 12:28 UTC
[Nouveau] [PATCH] gpu:nouveau: Do not use unnecessary IS_ERR_VALUE when pm_runtime_* calls
Make sure Pm_runtime_* calls does not use unnecessary IS_ERR_VALUE. when I run pm_runtime.cocci, I find the issue. So just replace it. Signed-off-by: zhong jiang <zhongjiang at huawei.com> --- drivers/gpu/drm/nouveau/nouveau_debugfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/nouveau/nouveau_debugfs.c b/drivers/gpu/drm/nouveau/nouveau_debugfs.c index 9109b69..9635704 100644 --- a/drivers/gpu/drm/nouveau/nouveau_debugfs.c +++ b/drivers/gpu/drm/nouveau/nouveau_debugfs.c @@ -161,7 +161,7 @@ } 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); -- 1.7.12.4
Seemingly Similar Threads
- [PATCH 02/32] debugfs: Wake up GPU before doing any reclocking
- [PATCH] drm/nouveau/debugfs: fix pm_runtime.cocci warnings (fwd)
- [PATCH] drm/nouveau/debugfs: fix pm_runtime.cocci warnings
- [PATCH 02/32] debugfs: Wake up GPU before doing any reclocking
- [PATCH] drm/nouveau/debugfs: Fix check of pm_runtime_get_sync failure