Received: by 2002:a5d:9c59:0:0:0:0:0 with SMTP id 25csp2183744iof; Tue, 7 Jun 2022 22:28:55 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwH9FFfQAEI+cuVvLfLvIulOBshU9pt6Ez97d0vJxjhTlltPzED9mbA73SWpYqaSZpPmbbh X-Received: by 2002:a05:6a00:1146:b0:4c9:ede0:725a with SMTP id b6-20020a056a00114600b004c9ede0725amr33030913pfm.35.1654666135501; Tue, 07 Jun 2022 22:28:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1654666135; cv=none; d=google.com; s=arc-20160816; b=1CQUIV+RQdvGVIjbJ5d5usZGYeDEabY5m72ZjUZhP1G2mh24nlv5JyEDp52o3ZndHd Rw7pBqjQE9KPxqwaxkfZ6qcYvppIP09czOFjXJoWvY9htuqOJ8EIpkQjXs0syP/bvmNK B8uo/iMUnoZSn6y/QAiBlETyl/tli4IZn5sxSsBCWzkQ9Ww3mDrHE+xIWBBN0d9w7Y2t S/d4ApbkkEculZJO5r3BAwzkMKI9OIEZnHrHCZMOFkZaOp7Aecjok1ZuiMgXotEXt6m9 HDHJoxiBNn3sgJVEcAo/3JP3F7MkZ8CccwtZSgBD++gH7imKfK3P/L8EMLeO8bR/96gf d7PA== 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=ZO74fLZif8i0QFvnl9srPUz7HJsJ50+/fqWxhiCTihY=; b=ZGyk1ftVdvW/zOA0ZC9AkZrCcu7eoQQ2G5i3a/2BOheIocDH2HuhmEBhVPhCaJQcYw PhQSYSJTkczjVJrOcevbdKrt0ZPlZhuQBO7KaO6tPwc8AZhOcLGxygfqcoEr6ZX1zQU3 GbZgdUAkp/dxgVjHpPdqjiIA9SHOf+au1ll2rvCXlMFW/FeVHnIJ8Xu17U0WekyxI5mJ 2PEOVweHdtfOuuz0MYxs5yIdMYWOmb6fUsOSRXN1XBecac7OdH2eaJ9rMUNuzFUx7A73 xX7BHneoztiLi0EMBwoB8VL7v+rYdn5Y38E+hnwG7+nzt6QlTLVZkleiCZ24UsmOMt9f o6Dw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=TiqRkGk5; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 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. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id w1-20020a170902d3c100b0016158ec5ac9si24673751plb.431.2022.06.07.22.28.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 Jun 2022 22:28:55 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=TiqRkGk5; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 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 C67B6D5737; Tue, 7 Jun 2022 21:54:57 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1348066AbiFGRrL (ORCPT + 99 others); Tue, 7 Jun 2022 13:47:11 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39774 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1347418AbiFGRan (ORCPT ); Tue, 7 Jun 2022 13:30:43 -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 3DACD110ADD; Tue, 7 Jun 2022 10:26:43 -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 C284761407; Tue, 7 Jun 2022 17:26:42 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id D392BC385A5; Tue, 7 Jun 2022 17:26:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1654622802; bh=WPIUsHALO1JgoBeue1CjKjj5WVAqDIuzFAH28GZodJw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=TiqRkGk5qWy2vqILHeh9n0EdAg46Z3Me3UG8ERk9M9uK0PhapG5ZReddwQrKfflX/ Bve3KMf7vCjFgBOGJeeLrZZrWjFeXy16FKCkqa4eDq+fTMXucVS6oAVw9Cfo5qy0/4 UFx4NcfFKUsAINWuYcd/+bC6P7MT4Ls9wPA+wYek= 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.10 187/452] irqchip/aspeed-scu-ic: Fix irq_of_parse_and_map() return value Date: Tue, 7 Jun 2022 19:00:44 +0200 Message-Id: <20220607164914.133568494@linuxfoundation.org> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220607164908.521895282@linuxfoundation.org> References: <20220607164908.521895282@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 0f0aac7cc114..7cb13364ecfa 100644 --- a/drivers/irqchip/irq-aspeed-scu-ic.c +++ b/drivers/irqchip/irq-aspeed-scu-ic.c @@ -159,8 +159,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