Received: by 2002:a5d:9c59:0:0:0:0:0 with SMTP id 25csp2158814iof; Tue, 7 Jun 2022 21:42:58 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwOHsbWD5swP5io5vux2c+HPfsJtQuR+LJXr3q0xcaKMFuE9kw1Z2+JxVmelVLF9x7jr+ch X-Received: by 2002:a17:902:c951:b0:166:4f65:cff2 with SMTP id i17-20020a170902c95100b001664f65cff2mr26935690pla.7.1654663377937; Tue, 07 Jun 2022 21:42:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1654663377; cv=none; d=google.com; s=arc-20160816; b=WkbA7urr13YU42lMINL7+aD8hBAs56jnThQjaivwrl1cWenVjmstUQc2ydWvbwvVPa +YJ1bjj9yG40uXcZfneLJyc8MduUZgWDO//RDZNw3arC3UgKwOkwI3AVnfR/eZvsnURo ws2+e2X8wmVVpMwTM0mnxEsJeyyHP5M8FusBIFCWxBPEuIDptgj4d/Q/wRBtaZdbsZss lXSbtgS9igG8ZKSQXbc9+7iRnm1LeCxSDda6JQ3Wd02lLeyk0HfRC1IcbEHZFm49ghXb OG+LqJ79yrM1hfycs0+jdhm+TdUyg1T+3nYEcJGRH9eYIH3WKstmRmOQaqp4XE5jSib/ wu/A== 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=BSqVscDp9teyxt8VKHoXwzkljthP3wCW0eb42xW/Y6Q=; b=iMoHjnq2/z90Bm5fqgplQZVANlRNUc9QDN7TZAcokR/5IB0xkMU7rUSYWOqqAUc3Px MIhGfzRx1GDaxFOKxgMFAMaY+2vnkiiUGH5f+Nlmd/8iV5Ewch54CfLn/ZAUbYSYJlah 7Ofa59NfCbf7qi3eOOZGuGXeaFSVki7Az1aWSdKglxg+b+UDklIYv5+gq4fJulUeQSoD da5ana9iNzEJ5uVzj2EGINlc6jU1FzfybdKR09Nz+BadoKuDNYSoFDzZimniGIkFmwAJ Z2YFpswG3EdSGAxmR6HImAKmlKB8zlYGPYDn97H+C+2+1bXmLuioaP5nVOHdsgkmzIBh 7sIw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=rZ54PyqY; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 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 lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id z11-20020a17090ad78b00b001df43050486si24161034pju.86.2022.06.07.21.42.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 Jun 2022 21:42:57 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=rZ54PyqY; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 6E661425D4F; Tue, 7 Jun 2022 21:13:04 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1384403AbiFGWmk (ORCPT + 99 others); Tue, 7 Jun 2022 18:42:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49004 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1380721AbiFGVbM (ORCPT ); Tue, 7 Jun 2022 17:31:12 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1750622AE68; Tue, 7 Jun 2022 12:03:24 -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 E008C617EE; Tue, 7 Jun 2022 19:03:23 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id E9C73C385A5; Tue, 7 Jun 2022 19:03:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1654628603; bh=9ngSOdPjjAPA6F7lCapsC6DrE+l8vaNY0CBrFpoeEAU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=rZ54PyqYmwSVvrf5Nm14oo4COFkJF+sFeokLY7DTQIztz0PcY3s6nOmd8vLBn0vjs Qb4Bw9oALDlFhBkAQmctlk4z/ivgUkFNvOxyKrNaAggOQhEA0eLV/Z8jaKDck+HSob VeyWEEzrOUP3gB9PHUGtmTjPl0wBNLZ93uNgGgqQ= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Krzysztof Kozlowski , Marc Zyngier , Sasha Levin Subject: [PATCH 5.18 389/879] irqchip/aspeed-scu-ic: Fix irq_of_parse_and_map() return value Date: Tue, 7 Jun 2022 18:58:27 +0200 Message-Id: <20220607165014.156089559@linuxfoundation.org> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220607165002.659942637@linuxfoundation.org> References: <20220607165002.659942637@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=-3.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=unavailable 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 f03a9670d27d23fe734a456f16e2579b21ec02b4 ] The irq_of_parse_and_map() returns 0 on failure, not a negative ERRNO. Fixes: 04f605906ff0 ("irqchip: Add Aspeed SCU interrupt controller") Signed-off-by: Krzysztof Kozlowski Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20220423094227.33148-2-krzysztof.kozlowski@linaro.org Signed-off-by: Sasha Levin --- drivers/irqchip/irq-aspeed-scu-ic.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/irqchip/irq-aspeed-scu-ic.c b/drivers/irqchip/irq-aspeed-scu-ic.c index 18b77c3e6db4..279e92cf0b16 100644 --- a/drivers/irqchip/irq-aspeed-scu-ic.c +++ b/drivers/irqchip/irq-aspeed-scu-ic.c @@ -157,8 +157,8 @@ static int aspeed_scu_ic_of_init_common(struct aspeed_scu_ic *scu_ic, } irq = irq_of_parse_and_map(node, 0); - if (irq < 0) { - rc = irq; + if (!irq) { + rc = -EINVAL; goto err; } -- 2.35.1