Received: by 2002:a5d:9c59:0:0:0:0:0 with SMTP id 25csp2156979iof; Tue, 7 Jun 2022 21:39:51 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxmJqfs18aTtQVcGG/ElJVyZw12mHWRk/5mzIGkSAAQnMY+q+RHVfm3w2Qgx8n0JeTsU5Ng X-Received: by 2002:a17:90a:740e:b0:1e2:a631:87e6 with SMTP id a14-20020a17090a740e00b001e2a63187e6mr35753787pjg.115.1654663191326; Tue, 07 Jun 2022 21:39:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1654663191; cv=none; d=google.com; s=arc-20160816; b=tEPlgEmzA14GOUUEi41r8+vsXaY12uWkWnG05KrCJk1JuZ1BITbGeGeQQh1yHeBmfT loofSA+U7TkOQjtjU2wk71oyUPsfGKpcAwbrPgB1cmjyM5UsxzJRIvILg1VD48VvC29P Iqix6KC6Em9prvBGJFGbzh+9fiemFrDksTsddNqgwJresWYTckcYCS0FklwKwYmhV37J zo74mFO+lEAUooom2yRye+TC03vOUjqAqCoBwja2o2kXJL3mzO9jrlGf9xIs8e/E+1rU hEHui1zBQrYUslyFlmQ2fgbE9VQnuH2+Zki676uuRhDNn+Jao7h966hitvY4HPOZ6pRu Vadg== 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=0u0XNXJ6xOTjmy7E5rH8J8x7+0L2g1yCLV/LSSSphPE=; b=cNKT32KCEu6tpngO+C49lV0vRWTo0s2fUUgGtNOEfFJ7kh3E0rCO88WoDmmYh0FMtO VXUVlvT9Y0pziFKltvm+FIFVnbGU5bsOWqhBSgpvrrF7fs1sbUF+gN+jonB37RgDFj7O tKdFJX6j4OMbMeicz7U9NCOaT3ExjIP+CXkb1kLGzskIZPXRjR+Gjb4+5UQtUXi2Twq6 qLDmmFTuC2R5edITP/i15zS+AI+MGzZsx5Quw1EqjldDVZ7Ct60YTXvb+T8eBq6/8a/0 WOyaBievdfg+3nS0balgBcWK8zGUq4+L+OIjeB7N4/F1Ca+zpQyLvUIvgl7kl2wpISbA pBuw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=cXceP7we; 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 l184-20020a6391c1000000b003fc2d55e661si2611144pge.484.2022.06.07.21.39.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 Jun 2022 21:39:51 -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=cXceP7we; 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 9AC432122BF; Tue, 7 Jun 2022 21:06:53 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1347694AbiFGRj6 (ORCPT + 99 others); Tue, 7 Jun 2022 13:39:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39758 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1347406AbiFGRan (ORCPT ); Tue, 7 Jun 2022 13:30:43 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 734E1110AC7; Tue, 7 Jun 2022 10:26:40 -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 0859060C7C; Tue, 7 Jun 2022 17:26:40 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 13D60C385A5; Tue, 7 Jun 2022 17:26:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1654622799; bh=16LTJ5r6Ir3NkZr+xeVgwoR27oHH0kOv7d0lmSGnVn4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=cXceP7weOsL1H8zZF4rgyozeVwd3w+5P/lm408OC9EhWgdYj/q7bsjGWJ4YWSXK6A wc309WYrOZB9dMt3uyk3S/EuZTtsqQvLIfKtBCONbph1A0AFlS8EzmcwkimuYoW0+h Nu8GDWrFlPrJb0dP4yUBmWm8lNAm/yrs3cjylVTs= 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 186/452] irqchip/aspeed-i2c-ic: Fix irq_of_parse_and_map() return value Date: Tue, 7 Jun 2022 19:00:43 +0200 Message-Id: <20220607164914.103530008@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 50f0f26e7c8665763d0d7d3372dbcf191f94d077 ] The irq_of_parse_and_map() returns 0 on failure, not a negative ERRNO. Fixes: f48e699ddf70 ("irqchip/aspeed-i2c-ic: Add I2C IRQ controller for Aspeed") Signed-off-by: Krzysztof Kozlowski Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20220423094227.33148-1-krzysztof.kozlowski@linaro.org Signed-off-by: Sasha Levin --- drivers/irqchip/irq-aspeed-i2c-ic.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/irqchip/irq-aspeed-i2c-ic.c b/drivers/irqchip/irq-aspeed-i2c-ic.c index 8d591c179f81..3d3210828e9b 100644 --- a/drivers/irqchip/irq-aspeed-i2c-ic.c +++ b/drivers/irqchip/irq-aspeed-i2c-ic.c @@ -79,8 +79,8 @@ static int __init aspeed_i2c_ic_of_init(struct device_node *node, } i2c_ic->parent_irq = irq_of_parse_and_map(node, 0); - if (i2c_ic->parent_irq < 0) { - ret = i2c_ic->parent_irq; + if (!i2c_ic->parent_irq) { + ret = -EINVAL; goto err_iounmap; } -- 2.35.1