Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1626747 > unrolled thread

[PATCH 2/5] clk: mvebu: Adjust two checks for null pointers in of_cpu_clk_setup()

Started bySF Markus Elfring <elfring@users.sourceforge.net>
First post2017-04-19 22:00 +0200
Last post2017-04-19 22:00 +0200
Articles 1 — 1 participant

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  [PATCH 2/5] clk: mvebu: Adjust two checks for null pointers in  of_cpu_clk_setup() SF Markus Elfring <elfring@users.sourceforge.net> - 2017-04-19 22:00 +0200

#1626747 — [PATCH 2/5] clk: mvebu: Adjust two checks for null pointers in of_cpu_clk_setup()

FromSF Markus Elfring <elfring@users.sourceforge.net>
Date2017-04-19 22:00 +0200
Subject[PATCH 2/5] clk: mvebu: Adjust two checks for null pointers in of_cpu_clk_setup()
Message-ID<ty3VD-7vf-13@gated-at.bofh.it>
From: Markus Elfring <elfring@users.sourceforge.net>
Date: Wed, 19 Apr 2017 20:25:59 +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/clk-cpu.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/clk/mvebu/clk-cpu.c b/drivers/clk/mvebu/clk-cpu.c
index 072aa38374ce..8162833d2041 100644
--- a/drivers/clk/mvebu/clk-cpu.c
+++ b/drivers/clk/mvebu/clk-cpu.c
@@ -173,13 +173,13 @@ static void __init of_cpu_clk_setup(struct device_node *node)
 	int ncpus = 0;
 	struct device_node *dn;
 
-	if (clock_complex_base == NULL) {
+	if (!clock_complex_base) {
 		pr_err("%s: clock-complex base register not set\n",
 			__func__);
 		return;
 	}
 
-	if (pmu_dfs_base == NULL)
+	if (!pmu_dfs_base)
 		pr_warn("%s: pmu-dfs base register not set, dynamic frequency scaling not available\n",
 			__func__);
 
-- 
2.12.2

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web