Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1626746
| From | SF Markus Elfring <elfring@users.sourceforge.net> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH 4/5] clk: mvebu: Adjust two checks for null pointers in kirkwood_fix_sscg_deviation() |
| Date | 2017-04-19 22:00 +0200 |
| Message-ID | <ty3VD-7vf-5@gated-at.bofh.it> (permalink) |
| References | <ty3VD-7vf-3@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
From: Markus Elfring <elfring@users.sourceforge.net>
Date: Wed, 19 Apr 2017 21:17:19 +0200
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
The script “checkpatch.pl” pointed information out like the following.
Comparison to NULL could be written !…
Thus fix the affected source code places.
Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
---
drivers/clk/mvebu/common.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/clk/mvebu/common.c b/drivers/clk/mvebu/common.c
index 472c88b90256..659d534a137b 100644
--- a/drivers/clk/mvebu/common.c
+++ b/drivers/clk/mvebu/common.c
@@ -51,13 +51,13 @@ u32 kirkwood_fix_sscg_deviation(u32 system_clk)
u64 freq_swing_half;
sscg_np = of_find_node_by_name(NULL, "sscg");
- if (sscg_np == NULL) {
+ if (!sscg_np) {
pr_err("cannot get SSCG register node\n");
return system_clk;
}
sscg_map = of_iomap(sscg_np, 0);
- if (sscg_map == NULL) {
+ if (!sscg_map) {
pr_err("cannot map SSCG register\n");
goto out;
}
--
2.12.2
Back to linux.kernel | Previous | Next | Find similar | Unroll thread
[PATCH 4/5] clk: mvebu: Adjust two checks for null pointers in kirkwood_fix_sscg_deviation() SF Markus Elfring <elfring@users.sourceforge.net> - 2017-04-19 22:00 +0200
csiph-web