Received: by 2002:a25:824b:0:0:0:0:0 with SMTP id d11csp1498985ybn; Wed, 2 Oct 2019 17:33:28 -0700 (PDT) X-Google-Smtp-Source: APXvYqy7/t4BR1SVhwWSgDbru0xIQf8qW3rt9szsOT0cZmakpKadbJCkBAhypIplBrAJxJ5gl8lC X-Received: by 2002:a17:906:1c03:: with SMTP id k3mr5455933ejg.32.1570062808575; Wed, 02 Oct 2019 17:33:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570062808; cv=none; d=google.com; s=arc-20160816; b=OOsYCDoDQ8KvRQD50wcxMYQytXosLOGeAiYI3VftkfCnqYajWFOCdWTMxZ2vpKBvwq OQ2LqWjn0U9SN3FH3+Klbpr0nCqYknujBV6a3kPq9nOCTuFL/oEjdM5QVzeUqHrtVxFv xFnK9MSSLdBbdFINheBVcUNvJmlJOtWeCdJXJ60PaOVJyW5PW+d/RIebUZd2WhU4+O7b FUKIMNwgT11cRnZxiJy83/es9ioE3ZBWa5aQdtC46/KAuJdq2dPZGMODHIyxGopC2zBh AwPYvD+xcbGMdO+hsmW+qeXU07lXaYmBEuYKdXE682I+V1/eiUS6FnHa24+yjMOb4lzc OFow== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=3VnnKl2LrhqjyKH1KQiZB7hJ16Qi3F1l1RHfX6a0Es4=; b=oexwkCudXLuhd6SB47LfBMmNe798n4Tyd32iaU6CJCDf1GojdlHIHVl5EzPcJ0DjrT 20965s2HmY7IB7ggv8D/NCM5DA1Sdp3vbsmoHUa2ftCgoUsHW3rcKVOPQ9sHGlL/srDr t/mWMFni8pmsrz9J9tASrO2KYSu3j0OYQ+h1qQJc6LVy3FSI39ZBUMpnpp6Mxzj0XDVL 0jJYAANAiit2hoksFqfRYJKagF9IpSiF6E+YGBYU2jEnCx5U2LnHN9nL4MibahAyFpFV 5Q3AKqA+AWZvS/mex2s0QeQCu03LaKKGDSTVI6Wch+/yHcBx0DRTHbUULlpKKXo7G1Q2 PjSw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@alliedtelesis.co.nz header.s=mail181024 header.b=mjFuhjmS; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=alliedtelesis.co.nz Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q22si410998eja.178.2019.10.02.17.33.04; Wed, 02 Oct 2019 17:33:28 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@alliedtelesis.co.nz header.s=mail181024 header.b=mjFuhjmS; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=alliedtelesis.co.nz Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729311AbfJCADT (ORCPT + 99 others); Wed, 2 Oct 2019 20:03:19 -0400 Received: from gate2.alliedtelesis.co.nz ([202.36.163.20]:55780 "EHLO gate2.alliedtelesis.co.nz" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729212AbfJCADQ (ORCPT ); Wed, 2 Oct 2019 20:03:16 -0400 Received: from mmarshal3.atlnz.lc (mmarshal3.atlnz.lc [10.32.18.43]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by gate2.alliedtelesis.co.nz (Postfix) with ESMTPS id 7EFED891AB; Thu, 3 Oct 2019 13:03:13 +1300 (NZDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alliedtelesis.co.nz; s=mail181024; t=1570060993; bh=3VnnKl2LrhqjyKH1KQiZB7hJ16Qi3F1l1RHfX6a0Es4=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=mjFuhjmSnsBfvlPu9H0nE3Tp+dSwoMoz2TEuBngeGK0Ef5ShLyNn+qHJ/OVwxP8OX lpT/9MdSmB7RCGZXZqhD/w5RHQwFV1UWaOfznTaaCChlWeK0rWbDXVq283RENMsDsU ds0no38E4UR5cDV1e8Jwzkh8VmEsPYdE9gcbSNYQOsNLCN/sevbTEQ4TAMURXcXTSl WEJIf/99w1nY2GSjVL/gNUQSDAU9f/HkhHCCLYgmf9GbuWOWQaMu3YSJdwYB84QAyX EMxW3fqvQAQgnBd58Pa+iDn7AAerdNGjtjhIKKWtjnVLeaOb48QHGQzFYExaFdXKIV Lsm1b/T45rssw== Received: from smtp (Not Verified[10.32.16.33]) by mmarshal3.atlnz.lc with Trustwave SEG (v7,5,8,10121) id ; Thu, 03 Oct 2019 13:03:13 +1300 Received: from chrisp-dl.ws.atlnz.lc (chrisp-dl.ws.atlnz.lc [10.33.22.20]) by smtp (Postfix) with ESMTP id 299E013EEC9; Thu, 3 Oct 2019 13:03:17 +1300 (NZDT) Received: by chrisp-dl.ws.atlnz.lc (Postfix, from userid 1030) id 51FA928003E; Thu, 3 Oct 2019 13:03:13 +1300 (NZDT) From: Chris Packham To: linus.walleij@linaro.org, rjui@broadcom.com, sbranden@broadcom.com, bcm-kernel-feedback-list@broadcom.com, rayagonda.kokatanur@broadcom.com, li.jin@broadcom.com Cc: linux-gpio@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Chris Packham Subject: [PATCH v2 1/2] pinctrl: iproc: allow for error from platform_get_irq() Date: Thu, 3 Oct 2019 13:03:09 +1300 Message-Id: <20191003000310.17099-2-chris.packham@alliedtelesis.co.nz> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20191003000310.17099-1-chris.packham@alliedtelesis.co.nz> References: <20191003000310.17099-1-chris.packham@alliedtelesis.co.nz> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable x-atlnz-ls: pat Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org platform_get_irq() can return an error code. Allow for this when getting the irq. Fixes: 6f265e5d4da7 ("pinctrl: bcm-iproc: Pass irqchip when adding gpioch= ip") Signed-off-by: Chris Packham --- drivers/pinctrl/bcm/pinctrl-iproc-gpio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/pinctrl/bcm/pinctrl-iproc-gpio.c b/drivers/pinctrl/b= cm/pinctrl-iproc-gpio.c index 6f7d3a2f2e97..8971fc54e974 100644 --- a/drivers/pinctrl/bcm/pinctrl-iproc-gpio.c +++ b/drivers/pinctrl/bcm/pinctrl-iproc-gpio.c @@ -853,7 +853,7 @@ static int iproc_gpio_probe(struct platform_device *p= dev) =20 /* optional GPIO interrupt support */ irq =3D platform_get_irq(pdev, 0); - if (irq) { + if (irq > 0) { struct irq_chip *irqc; struct gpio_irq_chip *girq; =20 --=20 2.23.0