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: <alpine.DEB.2.20.1807280815360.2466@hadrien>
Date:   Sat, 28 Jul 2018 08:19:38 +0200 (CEST)
From:   Julia Lawall <julia.lawall@...6.fr>
To:     Karol Herbst <karolherbst@...il.com>
cc:     Ben Skeggs <bskeggs@...hat.com>,
        Martin Peres <martin.peres@...e.fr>,
        David Airlie <airlied@...ux.ie>,
        dri-devel@...ts.freedesktop.org, nouveau@...ts.freedesktop.org,
        linux-kernel@...r.kernel.org, kbuild-all@...org
Subject: [PATCH] drm/nouveau/debugfs: fix pm_runtime.cocci warnings (fwd)

From: kbuild test robot <fengguang.wu@...el.com>

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 <karolherbst@...il.com>
Signed-off-by: kbuild test robot <fengguang.wu@...el.com>
Signed-off-by: Julia Lawall <julia.lawall@...6.fr>
---

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

 nouveau_debugfs.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/drivers/gpu/drm/nouveau/nouveau_debugfs.c
+++ b/drivers/gpu/drm/nouveau/nouveau_debugfs.c
@@ -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);

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ