From patchwork Wed Apr 19 19:56:21 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: SF Markus Elfring X-Patchwork-Id: 9688795 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 D5B8E60383 for ; Wed, 19 Apr 2017 19:56:36 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C7E222787C for ; Wed, 19 Apr 2017 19:56:36 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id BC72628447; Wed, 19 Apr 2017 19:56:36 +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 6021627D0E for ; Wed, 19 Apr 2017 19:56:36 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S939046AbdDST4f (ORCPT ); Wed, 19 Apr 2017 15:56:35 -0400 Received: from mout.web.de ([212.227.15.14]:51373 "EHLO mout.web.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S936036AbdDST4d (ORCPT ); Wed, 19 Apr 2017 15:56:33 -0400 Received: from [192.168.1.2] ([77.182.113.86]) by smtp.web.de (mrweb003 [213.165.67.108]) with ESMTPSA (Nemesis) id 0LZvfZ-1cJfSt2Tkb-00loYY; Wed, 19 Apr 2017 21:56:22 +0200 Subject: [PATCH 4/5] clk: mvebu: Adjust two checks for null pointers in kirkwood_fix_sscg_deviation() From: SF Markus Elfring To: linux-clk@vger.kernel.org, Michael Turquette , Stephen Boyd Cc: LKML , kernel-janitors@vger.kernel.org References: <8af5ccb0-f7c1-297c-2661-8ced61302c37@users.sourceforge.net> Message-ID: <8c5bdefb-896b-cd96-7e69-77ccb4a9286e@users.sourceforge.net> Date: Wed, 19 Apr 2017 21:56:21 +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: <8af5ccb0-f7c1-297c-2661-8ced61302c37@users.sourceforge.net> Content-Language: en-GB X-Provags-ID: V03:K0:EQCmZAOODG6h6batr/RxcnVAh4FLeX51dVdRbZQf3theTX7HWu6 HugXQnJBEo1P1vwS8/NEP5j+UuZzaIGoM4ai89FzFeZJYk7KBD1+U8GQyhJcQQZftzFjoSM TE8oIXure3VqyY9PRcwiwdKnWLmtRn74X7NzjwXsz+Nr4bKoHNi7aekZliyPCEqEjEbkeoN MjOk25TLUrrowcUKVF6Hw== X-UI-Out-Filterresults: notjunk:1; V01:K0:tFoovhqDBlk=:9ebJUb9BxKCllxs7qY8I3X njwQ7RxKdWXyjViOM6G5ePQyLWqDiRtsBrfZhDDzRrAFXhEBOne672YqExvZFCz85YAlMWGBl Cz6qSjtRKqJmDcZ1OhmWaAS2Kprp7QX7xp4CNpDtWDPx7zU5EZIGq6GGToh029QRlVZ3N9l2q BKcKY8iDZb+QwOq7+w4Gs0gI6krguZIBvoA9Ov9e8U/kiAVudE29c46uQaihvij8WF2MhZ4d6 niQF7YeOXDlMN7mCUaKqWhEJRcCHNG+IbYDhlHYTBs7Nho/I5Dd5Qdqy7Mky4YEdo4MwgeJ5q +zWpYVG5wQXRW5f/xuG2kl0boIfJoUVAcfpQZuvYyGbKe7HrSbijxY4kl4vOLfUQG+2+kCPmn 46pj6WqRwBR6rjJtd0thcH1sdHxalSGl3LTessWJTewa6G9cVNGyuFgzUE9dayeVeu2ARM/G1 HsBPHGHXc5bN7uHtZ5SiBnzEz0H6RDJUZFULgbkUDI6jlOJPegh9pdU3D//kGd1sFGn4ZurHs S5lwl2PnR6E/+a2/iJUu88vl1yaAepDM146Yst4UYt0+iyQrspyFiDhqQ0wfr+X4gjYoWIIsW gFfAWJk9FKZvDEhjbJNN/kLDCXqtS+n6OF0LjMFy9xSH5Oy3XxqS+USV9/fsrk22V9dI2YA2I Ppzo9ylqUcsyZLb2UFYc0FAHSpb3E4yqEml/ZLzq6ASzbVvbRe5q8k383UAe9vSdh3YfJ2m4O r7opHjJz0JpJuHIsOpim0Ny/VxivKbCajQ2PaW844Fg9DUdd1dnvfbPzCN5t7k0OXora+s2au EMymICD 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: 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 --- 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; }