linux-pm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/1] cpufreq: Fix NULL pointer comparison warning
@ 2016-12-06 10:17 Mohamed Wasif
  2016-12-06 10:29 ` Viresh Kumar
  2016-12-06 21:03 ` Rafael J. Wysocki
  0 siblings, 2 replies; 3+ messages in thread
From: Mohamed Wasif @ 2016-12-06 10:17 UTC (permalink / raw)
  To: Rafael J. Wysocki, Viresh Kumar, Mohamed Wasif
  Cc: linux-pm, linux-kernel, vidushi.koul

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

Signed-off-by: Mohamed Wasif <m.wasif@samsung.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

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2016-12-06 21:03 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-12-06 10:17 [PATCH 1/1] cpufreq: Fix NULL pointer comparison warning Mohamed Wasif
2016-12-06 10:29 ` Viresh Kumar
2016-12-06 21:03 ` Rafael J. Wysocki

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).