Messages in this thread Patch in this message | | | Subject | [PATCH 4/5] clk: mvebu: Adjust two checks for null pointers in kirkwood_fix_sscg_deviation() | From | SF Markus Elfring <> | Date | Wed, 19 Apr 2017 21:56:21 +0200 |
| |
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
| |