From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.0 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 76C94C43381 for ; Mon, 4 Mar 2019 21:15:01 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 361A5206DD for ; Mon, 4 Mar 2019 21:15:01 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726268AbfCDVO7 (ORCPT ); Mon, 4 Mar 2019 16:14:59 -0500 Received: from foss.arm.com ([217.140.101.70]:40118 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726080AbfCDVO7 (ORCPT ); Mon, 4 Mar 2019 16:14:59 -0500 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 01895EBD; Mon, 4 Mar 2019 13:14:59 -0800 (PST) Received: from big-swifty.misterjones.org (usa-sjc-mx-foss1.foss.arm.com [217.140.101.70]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id D50373F706; Mon, 4 Mar 2019 13:14:55 -0800 (PST) Date: Mon, 04 Mar 2019 21:14:52 +0000 Message-ID: <86d0n61gvn.wl-marc.zyngier@arm.com> From: Marc Zyngier To: Arnd Bergmann Cc: Thomas Gleixner , Jason Cooper , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , NXP Linux Team , Lucas Stach , Aisheng Dong , Fugang Duan , , Subject: Re: [PATCH] irqchip/imx-irqsteer: fix of_property_read_u32() error handling In-Reply-To: <20190304200245.1196001-1-arnd@arndb.de> References: <20190304200245.1196001-1-arnd@arndb.de> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI-EPG/1.14.7 (Harue) FLIM/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL/10.8 EasyPG/1.0.0 Emacs/26 (aarch64-unknown-linux-gnu) MULE/6.0 (HANACHIRUSATO) Organization: ARM Ltd MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 04 Mar 2019 20:02:18 +0000, Arnd Bergmann wrote: > > gcc points out that irqs_num is not initialized when of_property_read_u32() > is an empty stub function: > > Included from drivers/irqchip/irq-imx-irqsteer.c:7: > drivers/irqchip/irq-imx-irqsteer.c: In function 'imx_irqsteer_probe': > include/uapi/linux/kernel.h:13:49: error: 'irqs_num' may be used uninitialized in this function [-Werror=maybe-uninitialized] > > The same can actually happen with CONFIG_OF=y as well, though we don't > get a warning then. > > Add error checking here that lets the code deal with missing or > invalid properties as well as avoid the warning. > > Fixes: 28528fca4908 ("irqchip/imx-irqsteer: Add multi output interrupts support") > Signed-off-by: Arnd Bergmann > --- > drivers/irqchip/irq-imx-irqsteer.c | 8 ++++++-- > 1 file changed, 6 insertions(+), 2 deletions(-) Applied, thanks Arnd. M. -- Jazz is not dead, it just smell funny.