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 224CDC6FA82 for ; Sat, 10 Sep 2022 21:19:30 +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=/u9FXK+jOJUwylaZppYvpSvjUHx9oFhfhqsSX3uVgF8=; b=yrJkU2BpyqT26l 69aboIc+0qE8rwA2ybsTvIxHcvgrvafuEvDa5D1fsUPmr+5IGMIulLeZQbdiuxB2fjAxeFBixkfYd xPe7ihlsNA+tMaMm0eGDQAOmWxXSywFin3muu+ExAviXhAY9mPvfvHJgvldBX9eAW3AV3O+xITHGJ oy6Px9esVgQxRjdo1vrBbQ35sxMsd0mVt3alt1YLwPnzxmjbYZ9pwZKyjZZLKchhOOKK5pDFBiJ4X dzI4LWk4GWyQU1KNIMerrbqRM2Q6EGboZln9wPXpx+Cx+lMc8F0Qt6QjIj5wjTXoYZ7yyHSVsv3il yH/FohJ8swlcpf4PfSqg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oX7s2-00DSW7-IU; Sat, 10 Sep 2022 21:18:34 +0000 Received: from ams.source.kernel.org ([2604:1380:4601:e00::1]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1oX7s0-00DSTH-4D for linux-arm-kernel@lists.infradead.org; Sat, 10 Sep 2022 21:18:33 +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 ams.source.kernel.org (Postfix) with ESMTPS id BF36DB80761; Sat, 10 Sep 2022 21:18:30 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id D3369C43141; Sat, 10 Sep 2022 21:18:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1662844709; bh=lzvI08HxbeT3BDrPTiftpAaZxUwRATnxFpRa2DlgBPg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=FyYcXomylNuZLG/GZomqqwgJ5ZwqpnSmYHBxd8dv3b4XOBi40HM82PErG/0GF2Tu+ m1TvtUuiRhpgjJ8H0nCsIvV+pwvjIFJmFc+2H7J8pb1j1V8tTYOPR6JSi0PJAYIPIX HbFtUbAW+8Ycll6v0BTS0oMBqHYzVVFGFcn5E7IJn16drc7SMyv9W7cJDUe1pipJym jEJtCTe+8FiOTDCpFR3BtbpwNH2KBM+HPKpc93QeKutK84DdshhJPCgX/MzIq/V1NQ 2fCk+5BKoVtRAeOYdLX7REjRV03bAmKnVgCjmtMQdj+DXT51XcGVFyUq+AzPToLDpH js1FE9aV8NATg== 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.15 19/21] perf/arm_pmu_platform: fix tests for platform_get_irq() failure Date: Sat, 10 Sep 2022 17:17:50 -0400 Message-Id: <20220910211752.70291-19-sashal@kernel.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220910211752.70291-1-sashal@kernel.org> References: <20220910211752.70291-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_141832_322169_0B9711F9 X-CRM114-Status: GOOD ( 12.62 ) 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 513de1f54e2d7..933b96e243b84 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