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 8E60AC6FA83 for ; Sat, 10 Sep 2022 21:18:33 +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=PanIBUvCSy8HpC kGhx+rjtyRmnabzdV4ejq6lO2MdgC916GQnHrkUh6NeiJlcP+0R9lPqEA7tEU9lv2Uhj3eTMdCJTw RGsxxWvvuG7AVJ69hiiWsV0iXqeayQhhTy+rFCQdAMjDqvybK1WxZHe/O0mCAonYEFmy6pGcDgxVB ZcwSOTK+SjvZ7YgjdcKWX1OteT7XBx8ovypgG5sMcjT4rLAPV7xHDkcXKMFGPvtSkR2y1+ciPwI3Q 7f0r1uJvvqFpGahZ9wZJtBcqJF4Eh87DmWDxW7k000mZKW+UJGeoAwDQ71v4ViZZh8bDwOWRjygF9 tc9HdBR/Ah67HEXm1Pkw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oX7r9-00DRsu-Tn; Sat, 10 Sep 2022 21:17:40 +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 1oX7r3-00DRqJ-4d for linux-arm-kernel@lists.infradead.org; Sat, 10 Sep 2022 21:17:34 +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 92FB160EC3; Sat, 10 Sep 2022 21:17:32 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 4A460C43140; Sat, 10 Sep 2022 21:17:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1662844652; bh=lzvI08HxbeT3BDrPTiftpAaZxUwRATnxFpRa2DlgBPg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=AbbDznIDbQW9I6KlTLw5fcM6r9fj5IFzSFGy+oCKIWIIiOjaWcBPmuWwIkkorls+4 65v+kthTZoh84B7n85Iosr0iadJnIeH99birBoimckwD2BEkjrKqS0lBFsi65y7kfa sjeewtMrqSN+L7NzAA+Eb0ahCOP2rlQ2OfQ4yuG5pr3HNNSgDPPXioYZszPiWaiRge L0/oxszzf42G7CEDJMfAMv2eCEcNKmMCRBFldwrNtQ5Mmo1FLjjKcRshtbF82KrGSv kaAQrlszkG9UKgkxpNrQQsV+XH/7Pl1Oy/qtV4OH5rb+wfTSB1ampROMwvgu20AqNi cjLRsULoGUI7g== 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.19 30/38] perf/arm_pmu_platform: fix tests for platform_get_irq() failure Date: Sat, 10 Sep 2022 17:16:15 -0400 Message-Id: <20220910211623.69825-30-sashal@kernel.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220910211623.69825-1-sashal@kernel.org> References: <20220910211623.69825-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_141733_238851_E363F2DD 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 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