Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755531AbcKEOgB (ORCPT ); Sat, 5 Nov 2016 10:36:01 -0400 Received: from mout.gmx.net ([212.227.17.22]:51491 "EHLO mout.gmx.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754373AbcKEOf7 (ORCPT ); Sat, 5 Nov 2016 10:35:59 -0400 From: Heinrich Schuchardt To: Patrice Chotard , Linus Walleij Cc: linux-arm-kernel@lists.infradead.org, kernel@stlinux.com, linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org, Heinrich Schuchardt 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= Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 777 Lines: 23 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 --- 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); -- 2.10.1