Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 0181FC6FA82 for ; Sat, 10 Sep 2022 21:20:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=fUXu1zgnr9x0hUN1AvATABbGSXqc47qEr0omAQyoDxY=; b=3AmHIjXOJwDb4b zK0tPI7tekX/zHQxnL/VasU9YZlsA2MpPZQl2VDMB1w5kWglRw0U4mapSzXzKlp1W8LUOSAmaxWal NBa6gum3sfcHWSBtsosZ7Gg2JDKgyV5JqcLWa5yxJt2cv7W86FN1nRUADZNOsy3VXssJQZZfwEuTB XPUDE655WzW7unmuNmw14gPzgp2hBOdNDD81ar1vrcY3YkrFSW4MrbMB1KV04IyGLZtr7TCJDTIC9 SfDxcwc6j6wS757o7+J2UT48MGJagk6oxWBq4WVy8+RgWhV33IIC0fzd9zqTJuo7XnjTgt2pcmrms AwZOXLIJ7V0VCaGmDTOw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oX7sg-00DT0b-Qy; Sat, 10 Sep 2022 21:19:15 +0000 Received: from dfw.source.kernel.org ([139.178.84.217]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1oX7sR-00DSpe-1S for linux-arm-kernel@lists.infradead.org; Sat, 10 Sep 2022 21:19:00 +0000 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 995F760EBA; Sat, 10 Sep 2022 21:18:58 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5BF9EC43470; Sat, 10 Sep 2022 21:18:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1662844738; bh=BNqis8zEoyO3GPe0joWPNzLokGPfL/P4HVQzS+hWMrs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=a9ElXPvwz3+K9g66T2Yb5+KFxDdKsDTW+1olK9aIISgUshgX5QW4IEYia31DSQsAv nIrw1gQLzpdp+NpTqRepBJVSSDvEbWzot4VVA0ynuKOpow9LvkYUhCz2qffAGHz3IG QhATifB9XdRL7hPXx7FWsuONbbgpUWMDtTBCNeb1y4bxMyjUodfzyyfkPByyi/6RP5 vVbgoq3g1QSf67OAxIx8N17xfghwdbv48/A2jc2VszLU+DEIZxKRi9OrI3HfG+iX2D C9Rvi0fc19pgm2CSkbpt7Dnzx6MF0zhAQvFlZGBGfiBPo2aqtwF9b44H+M5YgQtVEo fPMaWEj55dZaw== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Yu Zhe , Will Deacon , Sasha Levin , mark.rutland@arm.com, linux-arm-kernel@lists.infradead.org Subject: [PATCH AUTOSEL 5.10 12/14] perf/arm_pmu_platform: fix tests for platform_get_irq() failure Date: Sat, 10 Sep 2022 17:18:30 -0400 Message-Id: <20220910211832.70579-12-sashal@kernel.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220910211832.70579-1-sashal@kernel.org> References: <20220910211832.70579-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220910_141859_140037_030FE500 X-CRM114-Status: GOOD ( 12.73 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org From: Yu Zhe [ Upstream commit 6bb0d64c100091e131cd16710b62fda3319cd0af ] The platform_get_irq() returns negative error codes. It can't actually return zero. Signed-off-by: Yu Zhe Link: https://lore.kernel.org/r/20220825011844.8536-1-yuzhe@nfschina.com Signed-off-by: Will Deacon Signed-off-by: Sasha Levin --- drivers/perf/arm_pmu_platform.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/perf/arm_pmu_platform.c b/drivers/perf/arm_pmu_platform.c index ef9676418c9f4..2e1f3680d8466 100644 --- a/drivers/perf/arm_pmu_platform.c +++ b/drivers/perf/arm_pmu_platform.c @@ -117,7 +117,7 @@ static int pmu_parse_irqs(struct arm_pmu *pmu) if (num_irqs == 1) { int irq = platform_get_irq(pdev, 0); - if (irq && irq_is_percpu_devid(irq)) + if ((irq > 0) && irq_is_percpu_devid(irq)) return pmu_parse_percpu_irq(pmu, irq); } -- 2.35.1 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel