Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S966219AbdDST4g (ORCPT ); Wed, 19 Apr 2017 15:56:36 -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 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-Type: text/plain; charset=utf-8 Content-Language: en-GB Content-Transfer-Encoding: 8bit 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-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1078 Lines: 39 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; } -- 2.12.2