[PATCH 3/8] clk: si5351: Adjust a null pointer check in si5351_dt_parse()

From: SF Markus Elfring
Date: Thu Apr 20 2017 - 04:26:21 EST


From: Markus Elfring <elfring@xxxxxxxxxxxxxxxxxxxxx>
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@xxxxxxxxxxxxxxxxxxxxx>
---
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