lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <1533384023-18787-1-git-send-email-zhongjiang@huawei.com>
Date:   Sat, 4 Aug 2018 20:00:23 +0800
From:   zhong jiang <zhongjiang@...wei.com>
To:     <airlied@...ux.ie>, <bskeggs@...hat.com>
CC:     <nouveau@...ts.freedesktop.org>, <linux-kernel@...r.kernel.org>
Subject: [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@...wei.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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ