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>] [thread-next>] [day] [month] [year] [list]
Date:	Thu, 5 Mar 2015 04:34:02 +0800
From:	kbuild test robot <fengguang.wu@...el.com>
To:	Javi Merino <javi.merino@....com>
Cc:	kbuild-all@...org, Eduardo Valentin <edubezval@...il.com>,
	Kapileshwar Singh <kapileshwar.singh@....com>,
	Punit Agrawal <punit.agrawal@....com>,
	Zhang Rui <rui.zhang@...el.com>, linux-pm@...r.kernel.org,
	linux-kernel@...r.kernel.org
Subject: [PATCH] thermal: cpu_cooling: fix ptr_ret.cocci warnings

drivers/thermal/cpu_cooling.c:463:18-24: WARNING: PTR_ERR_OR_ZERO can be used


 Use PTR_ERR_OR_ZERO rather than if(IS_ERR(...)) + PTR_ERR

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

CC: Javi Merino <javi.merino@....com>
Signed-off-by: Fengguang Wu <fengguang.wu@...el.com>
---

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

--- a/drivers/thermal/cpu_cooling.c
+++ b/drivers/thermal/cpu_cooling.c
@@ -460,7 +460,7 @@ static int get_static_power(struct cpufr
 	if (voltage == 0) {
 		dev_warn_ratelimited(cpufreq_device->cpu_dev,
 				     "Failed to get voltage for frequency %lu: %ld\n",
-				     freq_hz, IS_ERR(opp) ? PTR_ERR(opp) : 0);
+				     freq_hz, PTR_ERR_OR_ZERO(opp));
 		return -EINVAL;
 	}
 
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ