Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp2293141iob; Thu, 5 May 2022 22:11:54 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzlHs7FTsg7JvCe3tvbnzPlCbwYkUm6qJmr2zA32bc4fH3T6r0nvLnXP4acYIpfWAwNFSAc X-Received: by 2002:a17:907:1c89:b0:6f4:4089:8256 with SMTP id nb9-20020a1709071c8900b006f440898256mr1372651ejc.60.1651813913812; Thu, 05 May 2022 22:11:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1651813913; cv=none; d=google.com; s=arc-20160816; b=Tx39WkML/tLD2ZgsdH2oSGUatuGAplOI03puM8q0E0KgW0kMbyIy4D13NXwJqT7fHR PU45Nmyh9Fja5XzoiXpAH03aNfMfzeXMHsELn+xp5xtEs83qZouBn2mrAoSB8l3SZ/XZ OizCUE9PFHL3cHM8SMSlYzsBMhCRxzlHvMRlH+ZdN3yyH4Bqx+cYJQnSJO4AYrFqcAJ/ 4x2cC/seuG2qPxXwVzl4KS+4iOG8VO6ScAtquAt/nIBspj0uSyjtQp7Q9gyN0TD24EYW NZr4OQBihdOFjkVqyge4WwxcS2aeQcughVWxXjN1CKI1BhOdHrAyjndfHFbHPzAw3WWx OugQ== 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=5LqzYUZpRiUB591eCRsOEkH2wjc/UISwzzn8CgupfSU=; b=WqGjy73WZLiY1T9xGxzh5h1lpvPsb2BhSG5MBZ/gk7h1t/bex3Yxn6fb+OdoBgpfgV JL0/KzQZ3/veGntXE7mY4owiKHPHczYaPr9yqC4FKKNLykMnV3A3d/I5BPFtmOrkc6fo V6IkxslV44y8YGigQSHETph8+/mTbule0U4tyeb+k0FfZLiZyG8evJoI58XaC/UkTj8c OFybpCVhKr4xQxcw4GhNibMye2hhr6DqW+PiGldXN7ONBjWtWR3XZw6x4RBioHN0rZQx AiVUGVcwl9rjJTQ1Q25RBiciCl1cA/sMgC0Sf6apQ6e0zIntlDVsUmhJedCBmZncwDpZ 7xcQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=pHiSKk42; 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 ks24-20020a170906f85800b006f39f6d6a07si3549297ejb.983.2022.05.05.22.11.16; Thu, 05 May 2022 22:11:53 -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=pHiSKk42; 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 S1354029AbiEDQyr (ORCPT + 99 others); Wed, 4 May 2022 12:54:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51380 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1353848AbiEDQxe (ORCPT ); Wed, 4 May 2022 12:53:34 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C658047AEC; Wed, 4 May 2022 09:48:57 -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 ams.source.kernel.org (Postfix) with ESMTPS id F415DB82737; Wed, 4 May 2022 16:48:55 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id A5C62C385A5; Wed, 4 May 2022 16:48:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1651682934; bh=Vv8esSM2GXxjqp29nDHcWRb6ej6W2N0J0PRGsVfzTGI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=pHiSKk42XCDDyF00DdzJfWukP7H/kIz07mEWKX+gG0puOGQQ1lcZgH51oSeK/7VD1 hjwe/0C8GlDx2S/efSZ9nhwTxQ2n+k4GsoKUE9u+PeFUhzebezJqQ6fofh7p1OoStA XpjC5qiAhFapHjp3muBWQIThmCdHb16IOBycgtK0= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Zeal Robot , Lv Ruyi , Linus Walleij , Sasha Levin Subject: [PATCH 5.4 53/84] pinctrl: pistachio: fix use of irq_of_parse_and_map() Date: Wed, 4 May 2022 18:44:34 +0200 Message-Id: <20220504152931.528646211@linuxfoundation.org> X-Mailer: git-send-email 2.36.0 In-Reply-To: <20220504152927.744120418@linuxfoundation.org> References: <20220504152927.744120418@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=-7.7 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: Lv Ruyi [ Upstream commit 0c9843a74a85224a89daa81fa66891dae2f930e1 ] The irq_of_parse_and_map() function returns 0 on failure, and does not return an negative value. Fixes: cefc03e5995e ("pinctrl: Add Pistachio SoC pin control driver") Reported-by: Zeal Robot Signed-off-by: Lv Ruyi Link: https://lore.kernel.org/r/20220424031430.3170759-1-lv.ruyi@zte.com.cn Signed-off-by: Linus Walleij Signed-off-by: Sasha Levin --- drivers/pinctrl/pinctrl-pistachio.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/pinctrl/pinctrl-pistachio.c b/drivers/pinctrl/pinctrl-pistachio.c index 379e9a6a6d89..5f381e4c7577 100644 --- a/drivers/pinctrl/pinctrl-pistachio.c +++ b/drivers/pinctrl/pinctrl-pistachio.c @@ -1370,10 +1370,10 @@ static int pistachio_gpio_register(struct pistachio_pinctrl *pctl) } irq = irq_of_parse_and_map(child, 0); - if (irq < 0) { - dev_err(pctl->dev, "No IRQ for bank %u: %d\n", i, irq); + if (!irq) { + dev_err(pctl->dev, "No IRQ for bank %u\n", i); of_node_put(child); - ret = irq; + ret = -EINVAL; goto err; } -- 2.35.1