From patchwork Thu Apr 20 08:26:01 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: SF Markus Elfring X-Patchwork-Id: 9689861 X-Patchwork-Delegate: sboyd@codeaurora.org Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id CF8F4600C8 for ; Thu, 20 Apr 2017 08:26:18 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id BDD882845C for ; Thu, 20 Apr 2017 08:26:18 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B252E28464; Thu, 20 Apr 2017 08:26:18 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 383CA2845C for ; Thu, 20 Apr 2017 08:26:18 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S942253AbdDTI0R (ORCPT ); Thu, 20 Apr 2017 04:26:17 -0400 Received: from mout.web.de ([212.227.15.14]:52147 "EHLO mout.web.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S941899AbdDTI0P (ORCPT ); Thu, 20 Apr 2017 04:26:15 -0400 Received: from [192.168.1.2] ([77.182.247.81]) by smtp.web.de (mrweb003 [213.165.67.108]) with ESMTPSA (Nemesis) id 0MdLsp-1ckHNy12Y7-00IR6q; Thu, 20 Apr 2017 10:26:09 +0200 Subject: [PATCH 3/8] clk: si5351: Adjust a null pointer check in si5351_dt_parse() From: SF Markus Elfring To: linux-clk@vger.kernel.org, Michael Turquette , Stephen Boyd Cc: LKML , kernel-janitors@vger.kernel.org References: <94b24eaa-c5fb-80ea-441a-883989d14ef5@users.sourceforge.net> Message-ID: Date: Thu, 20 Apr 2017 10:26:01 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.0 MIME-Version: 1.0 In-Reply-To: <94b24eaa-c5fb-80ea-441a-883989d14ef5@users.sourceforge.net> Content-Language: en-GB X-Provags-ID: V03:K0:vw37kedEh6HU1Q1bzf150P3rlN/8iHjMZ8y9UASWRdHJYbEncCH A03YezeOO0MQDvs0XNS7AU189hKKCDiaMhwZWs/czvwZTY88PXWwnvr0hdUEAXCIF+gdbnm cXDUezViz6XXAS09ZYLXiiBQ2n/zsr0riigknKhnrlvkqCOr3QXNys4+M3BLnJDZKLtSrmN CXc4GWwKJjFBvkZuJpalA== X-UI-Out-Filterresults: notjunk:1; V01:K0:jYwiCYC/n4A=:wq+FNIWqEtoraI7Vt1k7Dq fD0fy+3HIurvPEFkIBPCsQXhFDmX3yNty8GFSPIy6p+imylLQ/5UgAkmLohdP859++S24sQNZ UtfRnzs+FXhKfXH2nHczY+p2rlYO9q9wdi9JR+2sEiJCHbQXoaLFo8jqSkh2JxW3Ro8Ij1e+m BPUYt92JUIgx1D0782/5Svp1jFRLy+DNK5nOCYdmkvf9FfvrMBac9CDNjiHMAiQOBpTgT54bG olTIShSyI4XxmZXaHjR+Y4qUHMWp7nLgXGsoOJhVgudocxiWr0vMkOZesWfKss/wd/QqBOfhA bgzACYWHmDHtN02W2HWo1/XqcWVlx6YGOmU8ggDFVaHJ8JZ/weZh5KdCMcsaH1ZXlRQ9hxnhD fxPEv6hnVeo59bJRnTD47NiE/GaO31FC5isPy4QWoJ/VDA76ySQ3XTntT9800Si3e5hqTZpsQ fjenkat/d21KLB6Iiel4BrOetpWmZyYXIuUmiZprLMLNK4JMultPlEVCYWuDWtLEPNCzRrqUe yKvQy+xURoBtmrImDmhlNWHnV5eSKJ/y/Gnw2yskikGypxJMXRDII4yRCFfejEmvpzW+D2+zw XV00+rXGjlh/HTXP5UY8DOiDzKvL32W0grZg4D6OeVpLWUXNUZC4J1yC4ZDq54H7ykUg9132G GWGzsid8QKvUP3LjAhEe6VDGAKnrfW/25+gqsZ/TOx+EJQ2b3KGnPsaU2jGVbdY09TcTUT+sW Obqq7lvW7/FSXgoo7QHs1p07dMVFT8o1JXuabEjdDcSiYLRjyvhqUXVJnBVltNGRW8x8s5UPY /6m8Ivl Sender: linux-clk-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-clk@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Markus Elfring 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 --- 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);