lkml.org 
[lkml]   [2017]   [Apr]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Subject[PATCH 3/8] clk: si5351: Adjust a null pointer check in si5351_dt_parse()
From
Date
From: Markus Elfring <elfring@users.sourceforge.net>
Date: Thu, 20 Apr 2017 07:47:04 +0200

The script "checkpatch.pl" pointed information out like the following.

Comparison to NULL could be written "!np".

Thus adjust this expression.

Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
---
drivers/clk/clk-si5351.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/clk/clk-si5351.c b/drivers/clk/clk-si5351.c
index 2492442eea77..a0acea67b571 100644
--- a/drivers/clk/clk-si5351.c
+++ b/drivers/clk/clk-si5351.c
@@ -1140,7 +1140,7 @@ static int si5351_dt_parse(struct i2c_client *client,
int num = 0;
u32 val;

- if (np == NULL)
+ if (!np)
return 0;

pdata = devm_kzalloc(&client->dev, sizeof(*pdata), GFP_KERNEL);
--
2.12.2
\
 
 \ /
  Last update: 2017-04-20 10:27    [W:0.101 / U:1.892 seconds]
©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site