From: Mohamed Wasif <m.wasif@samsung.com>
To: "Rafael J. Wysocki" <rjw@rjwysocki.net>,
Viresh Kumar <viresh.kumar@linaro.org>,
Mohamed Wasif <m.wasif@samsung.com>
Cc: linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org,
vidushi.koul@samsung.com
Subject: [PATCH 1/1] cpufreq: Fix NULL pointer comparison warning
Date: Tue, 06 Dec 2016 15:47:55 +0530 [thread overview]
Message-ID: <1481019475-26636-1-git-send-email-m.wasif@samsung.com> (raw)
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
next reply other threads:[~2016-12-06 10:20 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-12-06 10:17 Mohamed Wasif [this message]
2016-12-06 10:29 ` Viresh Kumar
2016-12-06 21:03 ` Rafael J. Wysocki
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1481019475-26636-1-git-send-email-m.wasif@samsung.com \
--to=m.wasif@samsung.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=rjw@rjwysocki.net \
--cc=vidushi.koul@samsung.com \
--cc=viresh.kumar@linaro.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®