From patchwork Wed Apr 19 19:54:12 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: 9688785 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 9A0A2602DC for ; Wed, 19 Apr 2017 19:54:44 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8AF172787C for ; Wed, 19 Apr 2017 19:54:44 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7EDE528429; Wed, 19 Apr 2017 19:54:44 +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 31D622787C for ; Wed, 19 Apr 2017 19:54:44 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S939008AbdDSTyU (ORCPT ); Wed, 19 Apr 2017 15:54:20 -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 Received: from [192.168.1.2] ([77.182.113.86]) by smtp.web.de (mrweb001 [213.165.67.108]) with ESMTPSA (Nemesis) id 0MMFFF-1cxNyi2wkX-0083qx; Wed, 19 Apr 2017 21:54:13 +0200 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-Language: en-GB 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-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 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__);