Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S939022AbdDSTyX (ORCPT ); Wed, 19 Apr 2017 15:54:23 -0400 Received: from mout.web.de ([212.227.15.4]:52354 "EHLO mout.web.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S939004AbdDSTyT (ORCPT ); Wed, 19 Apr 2017 15:54:19 -0400 Subject: [PATCH 2/5] clk: mvebu: Adjust two checks for null pointers in of_cpu_clk_setup() 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: <5b8ea228-917f-cfde-7000-5d8204b24bc1@users.sourceforge.net> Date: Wed, 19 Apr 2017 21:54:12 +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:j2Skx1ljXt3XOIRB+UTkde+i9OVU9x5gbivyfvHojJFXFItsPrW TxC55zrSlUpVD2BDJY4v9rRXowCR5ztgiV5ZOFk3oHdTwuiisJGk8QRrr6KMx5HIAEdKQUx fLM0frsd0KXvEQ2wYzeMNQhVajQ/B+HAkRNz76gvXNYJ2JOOtdXhzbDTR0THGPSymGtS5Oq TqB4tP8Zbll7CyUwApopQ== X-UI-Out-Filterresults: notjunk:1;V01:K0:0YtIeMk1+8g=:bRqboRM1P0VXvnKPy1JK2O SiUiFUqwvilGu5f9drTVyyus0D/f6WYOgEjrTuqxcDQR6bA6AaHbgciibMp+BRc8fwHHFF2Cs iLCdq1j9l0Z9QzHiBk8isZ7QsJ5xuS7HqhBkDi1ILKq38xV4w8Cl1nOPXdIKEJDomt5jGbZEv tAPkJjs0vk3xo24QvvDbS4MRukILX4lH3x7cL+E36p3WPSjnnpijimR9ZGD6gnEbypIZgzbpj e/y2eXHh1mQDRKDgMXHKMNV6WuahP8A8r0HEUMfNSEWkRp83eALINiP4lfX3Xf6b/0XKVsc/9 jl4rd/RNlVqy7FIxy0lZ3O96fZQusnos6wnPDe6EtDemmqAyYiUPUYDqqzCRIoZAQBaxjwde3 7je9z4+f8gHIzSaou6xOxJ7a9jvvp5Pc0NMvQji3rwuEkAbji60NjVuf04/X5kJmvv2GHmHta 69wKbTu+nbmai+jTCurr6b7Zt3wHCbMICHipeQk3m4p24zDDzaTuEX23JyB4bWrOn1UVBzyIO mYC+L8cgYEh1P3+lrBOzTmVDm716H350Wx7tRblNML68DS25aiVEKm3Jb9KbzSH5UnRZZ+l5G +2zMx2I5ZnIMHlBVVQ79x/jUmAXtRIg3txlGw+sszYfXjLqMoaXazYWnEWadp/M6TDUYjrrMq H9TzMMJKWgUQZzNcaEO169sMOHvQ6L0bCdLpsxvBuLpjBUPRdlxXy3GY+kOFU7uBHOQSFnlLt bkyYeje1Kaok+SG41s87/mAOjW1eXOjxQVTphTXCgeiyiRYuh+20np7iRc+L25strAbPiv4sZ a6wgV4I Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1125 Lines: 39 From: Markus Elfring Date: Wed, 19 Apr 2017 20:25:59 +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/clk-cpu.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/clk/mvebu/clk-cpu.c b/drivers/clk/mvebu/clk-cpu.c index 072aa38374ce..8162833d2041 100644 --- a/drivers/clk/mvebu/clk-cpu.c +++ b/drivers/clk/mvebu/clk-cpu.c @@ -173,13 +173,13 @@ static void __init of_cpu_clk_setup(struct device_node *node) int ncpus = 0; struct device_node *dn; - if (clock_complex_base == NULL) { + if (!clock_complex_base) { pr_err("%s: clock-complex base register not set\n", __func__); return; } - if (pmu_dfs_base == NULL) + if (!pmu_dfs_base) pr_warn("%s: pmu-dfs base register not set, dynamic frequency scaling not available\n", __func__); -- 2.12.2