From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750950AbcGNJz1 (ORCPT ); Thu, 14 Jul 2016 05:55:27 -0400 Received: from mout.kundenserver.de ([212.227.126.133]:63137 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750739AbcGNJzS (ORCPT ); Thu, 14 Jul 2016 05:55:18 -0400 From: Arnd Bergmann To: Brian Norris Cc: Teresa Remmet , Arnd Bergmann , Boris Brezillon , Richard Weinberger , David Woodhouse , Roger Quadros , Tony Lindgren , "Cooper Jr., Franklin" , linux-mtd@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH] mtd: nand: omap2: add missing braces Date: Thu, 14 Jul 2016 11:53:48 +0200 Message-Id: <20160714095416.739127-1-arnd@arndb.de> X-Mailer: git-send-email 2.9.0 X-Provags-ID: V03:K0:YorLmJoDAaJL8rN51LQH1m22jw2zMx584xn14MFqKyumMiHTgpr EXrDd9g4SvoGqeby31X1vLVdM7MWeWqMXmHMUx48x2aen/JloByXoTO4f2BVPfQtUk4sF6S y3giz0A1J2lZIM6VawTw5uLNpia40BB65EgvGgBuC/sdAeHjNUp39L3Xkv7lyQfu9GmO+j0 HHc1aXJOJ5J3i5uNum7ng== X-UI-Out-Filterresults: notjunk:1;V01:K0:DKpJ2md+f0o=:qQrgvtkUsNtDJKV/tWLKJU MBLUOfMsZYtusXyeIy7zQO3doyZnA8HaVXIjHLugEuY3XEBFA47Ms87wVHRxnalyqgh0wm34c hIwV4l+yqrAujjT+R4KoYufy6JCqKh5I9SjpsYlHfL4F6WsHJ0Cg9X74EqqJQ6+vlUNipaai3 r3R9CzM6bKMYv2GBkAsxkgVgLA8G+Jc4E/QMGot3w4CmrScpUwMFcCcTXZt5k3SqTvXB7sLPy poD5gOMTe1bAjzXWB63BnzhjLMX80g66T4TFPViLQexXuxQJLH88YfX5gIL6E3ciB4j6cw54K Yz40eUHgfICHg69CIS/j05V6XBZBzItasBffJ1yb151/FmjzazEUV2Bw9XT1AIp+xIvKJyPnL ryca0F0A3kd4sZDsLqvWkOkqcmTLr1rPbY1mHoNvBP/5yBS+4I6qJ3hFMd+Ri5NKc8F0L2pUS b5bY5IhYm6XiWcHY6G/+dlIzOfaSiI3rYc+YtBDVBIKt2CNnT4+0BIQ/ctBSIJrFRkNUCB1qU fQINXluvCUxRu/YXtDBKt6LFQGoamT30mzAwL9d4GbL7T3MLPqWZsRwFDI9Cs6IcQGnnJH27g E56Uipz705mLE0Hb2SF0bAdgnqSWSLZ6veRdULyvfq4gXHn542U1V6p8zlEjhHfA6YR5nL3+J 3N/2eN040eeQPwj+fXXaaD1aGAUChqkf1i0cP6PW1YPQ03/B4a85vnqPyeVx9/0wlCjg= Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org A bug fix just introduced incorrect behavior in the omap2 nand driver, as found by gcc-6.1: drivers/mtd/nand/omap2.c: In function 'omap_get_dt_info': drivers/mtd/nand/omap2.c:1658:2: error: this 'if' clause does not guard... [-Werror=misleading-indentation] if (!info->elm_of_node) ^~ drivers/mtd/nand/omap2.c:1660:3: note: ...this statement, but the latter is misleadingly indented as if it is guarded by the 'if' if (!info->elm_of_node) ^~ We clearly need to put the indented code into { } braces to get the intended behavior. Signed-off-by: Arnd Bergmann Fixes: 3bbca2c54f86 ("mtd: nand: omap2: Add check for old elm binding") --- drivers/mtd/nand/omap2.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/mtd/nand/omap2.c b/drivers/mtd/nand/omap2.c index a36ad3d146a3..ab7c34096a62 100644 --- a/drivers/mtd/nand/omap2.c +++ b/drivers/mtd/nand/omap2.c @@ -1655,10 +1655,11 @@ static int omap_get_dt_info(struct device *dev, struct omap_nand_info *info) /* detect availability of ELM module. Won't be present pre-OMAP4 */ info->elm_of_node = of_parse_phandle(child, "ti,elm-id", 0); - if (!info->elm_of_node) + if (!info->elm_of_node) { info->elm_of_node = of_parse_phandle(child, "elm_id", 0); if (!info->elm_of_node) dev_dbg(dev, "ti,elm-id not in DT\n"); + } /* select ecc-scheme for NAND */ if (of_property_read_string(child, "ti,nand-ecc-opt", &s)) { -- 2.9.0