Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp578390iog; Mon, 13 Jun 2022 08:29:25 -0700 (PDT) X-Google-Smtp-Source: AGRyM1v4n9eYtjl00kNtLxGZIRABppabhi34AFb5PccbQGfSJtDCr3cv2NbviD0yPC0PWfVLoT9g X-Received: by 2002:a17:903:32c1:b0:166:3f58:c1b3 with SMTP id i1-20020a17090332c100b001663f58c1b3mr229246plr.108.1655134164931; Mon, 13 Jun 2022 08:29:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1655134164; cv=none; d=google.com; s=arc-20160816; b=z6E9oEgCxBy6E5/UhUcheb/9DfvfcJKUN2TOfP2xWEfyUFzZ9iYWzN3hmXgdFOJZL4 JCdXs3FJAKSxMjHzpCSIt+Uf28YoGcEOmJTkIAcl6F/DHxbVLgQguSuoUwg1auB0PQ7k jQZY0KjbT83impshSF9saq1wZZpE/jny4+wEguQXJpfGSeh+nPYxdAVSGLakQ6nkINla 4N55ZcFEgv3c9ZXmjKtagEouksRvG30fZ7T/LyTWLG7/VaX8htBVq+WxO4zUz2bz7he+ ofJ9fbSxSOiqT78ElMIML8Iiv/5faXU/QurozgAgznMSlW1B67F42sg75po2gm7ITQ/s RNFg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=FHbdYZLec3L2KSAzQMBFp1j7Y6SWU+NEDNg/sz0O7P4=; b=KS/ZTVhwwXxsfLukw1X1iprjRSkMfbU/WMLJ43kQYSzB1UzWLL27wusonGcNMmHDz4 LsI4UCIH07T4in0TwFXGyp16sLQoQbFOd8JeMB+vpdgpyBFgFoD/j2DThmmPKXryTi/G GY7IFFZlpLUeALPrXQ1CE14zLqI/lHYJSHXOEEr4BIAFs9tv9LghjfgUY6gsAQaNS+6Z sAmui9XVaLZ7qLHmMi0a7R/4Y2vLG2aTqjw3rqUAdGEj4LoqXjxuQBvbanKCvK45Zm8N RM16U5RaDn3gKUUVACOqp4l1TdRH8kg5PqO7KhCLPiPaeLEjS6HSpFWGxY+8bZqs79tb oxDw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=2KPLErRK; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id me11-20020a17090b17cb00b001e270b50269si10792065pjb.104.2022.06.13.08.29.11; Mon, 13 Jun 2022 08:29:24 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=2KPLErRK; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344671AbiFMKrx (ORCPT + 99 others); Mon, 13 Jun 2022 06:47:53 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36836 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1347898AbiFMKoG (ORCPT ); Mon, 13 Jun 2022 06:44:06 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9C42C20BD8; Mon, 13 Jun 2022 03:25:14 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 216ED60EFB; Mon, 13 Jun 2022 10:25:14 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2D5E9C34114; Mon, 13 Jun 2022 10:25:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1655115913; bh=xzGCfSZLzTsBiin7Dgz+G3EE85Jy2LOqbeb2Sx8S30o=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=2KPLErRKufUCTyAX65hLfrl/Fm9tc4c9jiefe5FAOYas5AP/WJdX8nCN5mM6dK55q TOPgIEGn925wqnvO0nPAVGxVz++a4e+lGPm25/6obYxR2T+o1NRhnHcx6NGfHCMfyI Xg8Wt5DkIDXKNvA5FB5fGfMZcfGukpEN1YH0a5qE= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Krzysztof Kozlowski , Linus Walleij , Sasha Levin Subject: [PATCH 4.14 087/218] pinctrl: mvebu: Fix irq_of_parse_and_map() return value Date: Mon, 13 Jun 2022 12:09:05 +0200 Message-Id: <20220613094923.172492679@linuxfoundation.org> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220613094908.257446132@linuxfoundation.org> References: <20220613094908.257446132@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-8.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Krzysztof Kozlowski [ Upstream commit 71bc7cf3be65bab441e03667cf215c557712976c ] The irq_of_parse_and_map() returns 0 on failure, not a negative ERRNO. Fixes: 2f227605394b ("pinctrl: armada-37xx: Add irqchip support") Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20220422105339.78810-1-krzysztof.kozlowski@linaro.org Signed-off-by: Linus Walleij Signed-off-by: Sasha Levin --- drivers/pinctrl/mvebu/pinctrl-armada-37xx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/pinctrl/mvebu/pinctrl-armada-37xx.c b/drivers/pinctrl/mvebu/pinctrl-armada-37xx.c index 9f7d917458c7..d90aae2a5cfd 100644 --- a/drivers/pinctrl/mvebu/pinctrl-armada-37xx.c +++ b/drivers/pinctrl/mvebu/pinctrl-armada-37xx.c @@ -710,7 +710,7 @@ static int armada_37xx_irqchip_register(struct platform_device *pdev, for (i = 0; i < nr_irq_parent; i++) { int irq = irq_of_parse_and_map(np, i); - if (irq < 0) + if (!irq) continue; gpiochip_set_chained_irqchip(gc, irqchip, irq, -- 2.35.1