From patchwork Sat Nov 5 14:35:15 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Heinrich Schuchardt X-Patchwork-Id: 9413701 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 C2F4C6022E for ; Sat, 5 Nov 2016 14:37:40 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B233528CE9 for ; Sat, 5 Nov 2016 14:37:40 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A2FD829965; Sat, 5 Nov 2016 14:37:40 +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=-3.7 required=2.0 tests=BAYES_00,FREEMAIL_FROM, RCVD_IN_DNSWL_MED,RCVD_IN_SORBS_SPAM autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 3F1A328CE9 for ; Sat, 5 Nov 2016 14:37:39 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.85_2 #1 (Red Hat Linux)) id 1c324d-0004qP-Hc; Sat, 05 Nov 2016 14:35:59 +0000 Received: from mout.gmx.net ([212.227.17.22]) by bombadil.infradead.org with esmtps (Exim 4.85_2 #1 (Red Hat Linux)) id 1c324a-0004nM-1T for linux-arm-kernel@lists.infradead.org; Sat, 05 Nov 2016 14:35:56 +0000 Received: from LT002.fritz.box ([84.119.32.78]) by mail.gmx.com (mrgmx102) with ESMTPSA (Nemesis) id 0MJmcS-1c1vbT0sTc-00196K; Sat, 05 Nov 2016 15:35:23 +0100 From: Heinrich Schuchardt To: Patrice Chotard , Linus Walleij Subject: [PATCH 1/1] pinctrl: st: st_pctl_dt_parse_groups simplify expression Date: Sat, 5 Nov 2016 15:35:15 +0100 Message-Id: <20161105143515.4668-1-xypron.glpk@gmx.de> X-Mailer: git-send-email 2.10.1 X-Provags-ID: V03:K0:JVlT33nhPsB9O0n1Kq06dVZuzaCSM7zMQd46zMmRNA5iE0WPPWD 7xZs0YuIGNO1zSki8QmfiqluUju3l1JsLrZsklEeWY2L6xiy6ZV957DMewhuwMOwrj/1qd0 /njISfQqvap1Q+CMX4O1Uz+bOni2EZBWxQF8+wsyyG3YAWN2OHuK6kfW5DttOVyGIcmuvoA xflvK2ienpxpWZ5aCeYag== X-UI-Out-Filterresults: notjunk:1; V01:K0:gR6NjtVlu4c=:LQ3OD5hA9bv7Ek4JJcAeNy 3sm1ZleehFiGFAKCNguncUDTgD3XcPPJUgjbIHcLhBFjKfNkJrYyFq8pQX+Cg8JWtEEYxQyvf eZpCXHkWCaKyM6378GpGWyI0+uDRRj51epnDhFKcAFpDUUucJYUoE9B6+Nc0ZniEdvFOVacF+ lCIeIiq7RxGt67ZmRKP0ebouGQco86XD2PPt7wOCEElOrHgWq2D3KXFNbK9Xl/g8Ldsc79Yui DoLQHUdMLKX4YVawV7uQjAjxw/ItDh3NlY4CqV8ASsPmSNOw3zTIjT1ldI5Ia61/wcid3RqtY BJVj98n5ioKwGFT1NKiHKRlNF0eGzRMtgrW0JGsWZWpJwZS5NBNehPBgtu0gEAQJRSlaw1dxv vAVCDT05vcnZ0jnc3kc+Mf4bH7+u2dVS0YCdF229wFcrhCAav0A0OGgzOW+kirJkslHGqVynV IarUyQE1vh8AaswkBgc7t3PsqhPdu2N46Q56dKnlAbuXGOjsrVxKFhxSqD7nhwozLTEZWtRtP FXkL+vcWUOiLWp/ikcEOYCGLOdxNsvZMJz5hV9BQE3rlG2GpKWThO8VeyjpycXGJ4RnWiWmr3 sGrEloZzIhKIu1eInrbF8ohynBHrfSkwlFUsJtrHU+gZGnS/SER3u3I3LOouezlUmrT/k5+AQ oziOG4Wa4+TkND7ivJOnxybUjzC2norHpLvadg6YPGO4e5nyjT8hW47EEsFzFnJyP/3ANMSkV L1AD3yWYq5w8toXrpX/fQ/SnDOtq6RZEYtTXfuDKBu5Gz6/j072IvZGPKr0= X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20161105_073556_461225_CCE2CF11 X-CRM114-Status: UNSURE ( 8.79 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Heinrich Schuchardt , linux-gpio@vger.kernel.org, kernel@stlinux.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP for_each_property_of_node(pins, pp) checks that pp is not NULL. So there is no need to check it inside the loop. Signed-off-by: Heinrich Schuchardt Acked-by: Patrice Chotard --- drivers/pinctrl/pinctrl-st.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/pinctrl/pinctrl-st.c b/drivers/pinctrl/pinctrl-st.c index 8308f15..676efcc 100644 --- a/drivers/pinctrl/pinctrl-st.c +++ b/drivers/pinctrl/pinctrl-st.c @@ -1181,7 +1181,7 @@ static int st_pctl_dt_parse_groups(struct device_node *np, if (!strcmp(pp->name, "name")) continue; - if (pp && (pp->length/sizeof(__be32)) >= OF_GPIO_ARGS_MIN) { + if (pp->length / sizeof(__be32) >= OF_GPIO_ARGS_MIN) { npins++; } else { pr_warn("Invalid st,pins in %s node\n", np->name);