From patchwork Wed Jun 21 18:20:04 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Wahren X-Patchwork-Id: 9802555 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 CF61D6038C for ; Wed, 21 Jun 2017 18:21:56 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C2E772878C for ; Wed, 21 Jun 2017 18:21:56 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 39BE5286B0; Wed, 21 Jun 2017 18:21:56 +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=-1.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id A843C28694 for ; Wed, 21 Jun 2017 18:21:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To: References:List-Owner; bh=eJ9FpM4l+r1+nQpzTdZ0vjM+HIAZRdqUPqsTNhu336c=; b=FdI lzqHvFgapc2Y0sZklSN+thzbM8wXIMCjNBeOPzD4ifzrox0YV/EeCLhQa/q3EgSGlgbGo+QZ2Z3Qm KAzyHx0v8TPwfC5mxfA5s92nh8gbtwubmCwPHjIuh/EZnxGB+oxuwxnHr+PqrVgZHzXGvw10b1fFe k5UOEZMGz+GnZD31hi4weQ5TTYtVrttciK72MRVbaPweYLcMVyRw3v9OUvETmM6HGflA4re6y1yVJ 9epNHLSGBbdkj5uSp2I8bniisSDt21x5TEaKTmQ1HqhEQ1PymgHj9iFcQez7hYCA7LOFzOwHjyo+L fEB6DYIjaQYXBLN32lrO50zvhydYgqQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1dNkFh-0001YW-IK; Wed, 21 Jun 2017 18:21:17 +0000 Received: from mout.kundenserver.de ([212.227.126.135]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1dNkFY-0000w2-JV; Wed, 21 Jun 2017 18:21:15 +0000 Received: from localhost.localdomain ([95.90.210.54]) by mrelayeu.kundenserver.de (mreue005 [212.227.15.167]) with ESMTPSA (Nemesis) id 0MCuUJ-1dWEoo2buF-009hwt; Wed, 21 Jun 2017 20:20:37 +0200 From: Stefan Wahren To: Linus Walleij , Eric Anholt Subject: [PATCH] pinctrl: bcm2835: Avoid warning from __irq_do_set_handler Date: Wed, 21 Jun 2017 20:20:04 +0200 Message-Id: <1498069204-28154-1-git-send-email-stefan.wahren@i2se.com> X-Mailer: git-send-email 2.7.4 X-Provags-ID: V03:K0:ZTNSx+Hl7VM44tMtweAZ09jEq0h2UFfpTkrlizjbSxJz7ZMp6ip QlVPe3HeaY+FTqd10VrjeFM2g+pEiI0JqaUIVhqp1sR97o+yX48PeocAd7Zl5bP8yTqT+HN 6AQ8TPaOYuhahExr7RGTHle9FIKcBeJCDLf8JGAkbRw8oO3Om/GcyG6L+DOQNDNBlhXgjL+ j4NTNyca4AeWyBdUSZsqw== X-UI-Out-Filterresults: notjunk:1; V01:K0:aSAOHCPo0gE=:e+HPb49pPyiK+TkwriK4s4 aXT7YShXeq8YRwrvdVaHqSdMOC2lIDrnYyeJA8OYsNPxzmvNQEDVEysfG56KnnwNkvnRMJyuL 69866agiENJWbJc53i2lsOLODHatgao/UtvDfCRodarViLHHQz1gx93t8E+tdOTV7zJxBbnrF BxrHnSARNhymQK99L9XVPSeW9B7Jc/rM0lzppOTivgNFnR/z162sdbT9lwwVb4KEdGIBunkGz 4Ru2yuvIrBZOfme+Np3EPZdRsSZ2oSh+Zgh8hdgsI993eqbGr+JNbk8+4KyVvd9pW20kIQVAV GbAkeW+dRd1IOUGsv8p5whFDh21d/Fs8KtiZ3vddYTIwPKfRGAVvZWtPrXyzbb7cdkFSoyGOF FyoFP8YGHhwUMSfvP2V8k1BWalgbTsR1AymJzkp/nuA7/vXZlf7byyhOvbA9IBEiJ1foN1SCi fRnvw0P1c7wYcKeFWERvL8kStotxdPWl0qYV/2+sgkkFqcwKAxHEjSnM+e8cn0u9mpCn9PwQa bLaOFbSHD0QyAmU1hTipRdZGOw81LurWH/fwr/5ddL2pt5dcHdJFrXzL8J/ce9BoqiwrByOHk MviZftvrPXZO5ffOZ8JCMJU0MPjCcI0bpiyGQTMhqrCTbHnLQ47Z65uB7yWTO7bP5AJ3TEyY0 grNSGsJeHpMS6hKFsS5CQTCWlimlqoHtpOJ8vyX0WW562/4XWtWZO8RGdkJ3sVmeLqS0= X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170621_112109_194309_24EDFC45 X-CRM114-Status: UNSURE ( 8.73 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Stefan Wahren , linux-gpio@vger.kernel.org, Phil Elwell , linux-rpi-kernel@lists.infradead.org, linux-arm-kernel@lists.infradead.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 We get a warning during boot with enabled EARLY_PRINTK that we try to set a irq_chip without data. This is caused by ignoring the return value of irq_of_parse_and_map(). So avoid calling gpiochip_set_chained_irqchip() in error case. Signed-off-by: Stefan Wahren Fixes: 85ae9e512f43 ("pinctrl: bcm2835: switch to GPIOLIB_IRQCHIP") --- drivers/pinctrl/bcm/pinctrl-bcm2835.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/pinctrl/bcm/pinctrl-bcm2835.c b/drivers/pinctrl/bcm/pinctrl-bcm2835.c index 1eb7a1a..2308831 100644 --- a/drivers/pinctrl/bcm/pinctrl-bcm2835.c +++ b/drivers/pinctrl/bcm/pinctrl-bcm2835.c @@ -1048,6 +1048,10 @@ static int bcm2835_pinctrl_probe(struct platform_device *pdev) for (i = 0; i < BCM2835_NUM_IRQS; i++) { pc->irq[i] = irq_of_parse_and_map(np, i); pc->irq_group[i] = i; + + if (pc->irq[i] == 0) + continue; + /* * Use the same handler for all groups: this is necessary * since we use one gpiochip to cover all lines - the