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 for Android: free password hash cracker in your pocket
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-id: <1481019475-26636-1-git-send-email-m.wasif@samsung.com>
Date:   Tue, 06 Dec 2016 15:47:55 +0530
From:   Mohamed Wasif <m.wasif@...sung.com>
To:     "Rafael J. Wysocki" <rjw@...ysocki.net>,
        Viresh Kumar <viresh.kumar@...aro.org>,
        Mohamed Wasif <m.wasif@...sung.com>
Cc:     linux-pm@...r.kernel.org, linux-kernel@...r.kernel.org,
        vidushi.koul@...sung.com
Subject: [PATCH 1/1] cpufreq: Fix NULL pointer comparison warning

Replace direct comparisons to NULL
This problem was detected by checkpatch.

Signed-off-by: Mohamed Wasif <m.wasif@...sung.com>
---
 drivers/cpufreq/cpufreq.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c
index 6e6c1fb..ca3542e 100644
--- a/drivers/cpufreq/cpufreq.c
+++ b/drivers/cpufreq/cpufreq.c
@@ -590,7 +590,7 @@ static int cpufreq_parse_governor(char *str_governor, unsigned int *policy,
 
 		t = find_governor(str_governor);
 
-		if (t == NULL) {
+		if (!t) {
 			int ret;
 
 			mutex_unlock(&cpufreq_governor_mutex);
@@ -601,7 +601,7 @@ static int cpufreq_parse_governor(char *str_governor, unsigned int *policy,
 				t = find_governor(str_governor);
 		}
 
-		if (t != NULL) {
+		if (t) {
 			*governor = t;
 			err = 0;
 		}
-- 
1.7.9.5

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ