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 CFD55C6FA82 for ; Sat, 10 Sep 2022 21:21:34 +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=x+wwIOPidMt8MNEu9334bDJW3w65XCgtWepgiC9GuX8=; b=asocB/Me2s5stI sYDg2KZ+dEtJl+ILKImGaGeB6hcFSm9yyfVA/CXEokZEaRC6yNktoHcN2RERJCLSoqiJL+31AwGrV tPoXybu/EauSOfFv99+KknK5StAlvudvHM3tyUx+FfI/H6EAk5c4skPgIaExTgCIOdaG79uYe/sAP bthlZQyUuV8KGMQAKGmI1sVQxOgR2YH5So7rfztFHxJ38Kf3a8Aw0dIzs/FpoRjzcF8RLVkHppe2r qGmFvAFi1qBN1IPeF8iS+zdtNdKBFOinEM6xpo+c9fhWUag72hezBo/nb6O3gdkueB1OS5W0cdCnt gJ8INZrP5qzuin9mgl5Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oX7tt-00DU1C-1H; Sat, 10 Sep 2022 21:20:29 +0000 Received: from ams.source.kernel.org ([145.40.68.75]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1oX7t3-00DTNZ-NR for linux-arm-kernel@lists.infradead.org; Sat, 10 Sep 2022 21:19:40 +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 57111B80A28; Sat, 10 Sep 2022 21:19:36 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 551B6C43142; Sat, 10 Sep 2022 21:19:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1662844775; bh=tSXfzAbEEGzejCMYQW03tijt0WD8X9cB7zVT+7xfYmY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=WujG9K1twcLk4MGo5BMTs17r+yvt55tHMaxKSUrKe82qOamPLKfO2h2qbGfl0np0o 72uGJAp7np+HpnE+lwdg9JH9gffJGJjRaqlTsbLkT6/UBXuCdzZ53xRUxmfYj1sMfx 9FbTLVmxRQPpTo6cFt2Gie83fpYwyY1EdpVN9XTcHVoVSOXzQ+IwTuACd8E9E7ZTMb Rsrs162r6L7axXko/PscbyB9fPSDjuspnOPwtJYKNAhyfj5yS9+oXf1qnA1eHGDvUm y1Nv8rQkWlLP5ympVj6lWMbUjJ9VDQef3kRSYWxS8GE/pQoPM02a3EvtDcBNZq+lX+ ZpUrKCSLkT7Hw== 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 4.19 6/8] perf/arm_pmu_platform: fix tests for platform_get_irq() failure Date: Sat, 10 Sep 2022 17:19:19 -0400 Message-Id: <20220910211921.70891-6-sashal@kernel.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220910211921.70891-1-sashal@kernel.org> References: <20220910211921.70891-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_141938_082865_9123778A 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 199293450acfc..0ffa4f45a8391 100644 --- a/drivers/perf/arm_pmu_platform.c +++ b/drivers/perf/arm_pmu_platform.c @@ -118,7 +118,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