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 D9841C4332F for ; Mon, 25 Apr 2022 10:06:10 +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: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:In-Reply-To:References: List-Owner; bh=Bj4WZn1Q06Gm6L3Rrc3uTM1WYLRtOtVPrqivERGHgAk=; b=rPWocIulE3dEdd LDv+T/Ey/nL981l5nDYWIuuQ1wq4WVuonh8P5GJsS3ED1cxTn3IRwGuENKNu3YJ7Q9oSYjhRt4Nqm QHTW+i7M0p0DOPWCNdj8vp2/XxjxnzPkfsFbvqbKCMK129W5Gzphd+qi5Q+p++F9knkerb7vnRtyz +amlSyfCjTNqV9z9qi1x/97SqVTK23RyUKH9qrypx71l3SWI23x2mhm1d76zAQjQ0mSB1VUhY0iAe 1vDddll5dEg7XPdbRQrY1O/wMR9fHLXBRDjNRW88lfnvXBk5UW2UB2n0HZ9nHHtf89Jv0ghsx9j75 r+cLOzNdMAhuqMdZK2qA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nivac-0094IV-GK; Mon, 25 Apr 2022 10:05:06 +0000 Received: from mail.nfschina.com ([124.16.136.209]) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nivaZ-0094GZ-KK for linux-arm-kernel@lists.infradead.org; Mon, 25 Apr 2022 10:05:05 +0000 Received: from localhost (unknown [127.0.0.1]) by mail.nfschina.com (Postfix) with ESMTP id 03D421E80D56; Mon, 25 Apr 2022 18:01:40 +0800 (CST) X-Virus-Scanned: amavisd-new at test.com Received: from mail.nfschina.com ([127.0.0.1]) by localhost (mail.nfschina.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id iGzNYuuDUnyk; Mon, 25 Apr 2022 18:01:37 +0800 (CST) Received: from localhost.localdomain (unknown [61.152.154.55]) (Authenticated sender: renyu@nfschina.com) by mail.nfschina.com (Postfix) with ESMTPA id 20A941E80CB5; Mon, 25 Apr 2022 18:01:37 +0800 (CST) From: Ren Yu To: will@kernel.org Cc: mark.rutland@arm.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, liqiong@nfschina.com, yuzhe@nfschina.com, Ren Yu Subject: [PATCH] perf: check return value of armpmu_request_irq() Date: Mon, 25 Apr 2022 18:04:36 +0800 Message-Id: <20220425100436.4881-1-renyu@nfschina.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220425_030503_897977_9DAAB84E X-CRM114-Status: UNSURE ( 7.88 ) X-CRM114-Notice: Please train this message. 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 When the function armpmu_request_irq() failed, goto err Signed-off-by: Ren Yu --- drivers/perf/arm_pmu_acpi.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/perf/arm_pmu_acpi.c b/drivers/perf/arm_pmu_acpi.c index f5c7a845cd7b..96ffadd654ff 100644 --- a/drivers/perf/arm_pmu_acpi.c +++ b/drivers/perf/arm_pmu_acpi.c @@ -159,7 +159,9 @@ static int arm_pmu_acpi_parse_irqs(void) * them with their PMUs. */ per_cpu(pmu_irqs, cpu) = irq; - armpmu_request_irq(irq, cpu); + err = armpmu_request_irq(irq, cpu); + if (err) + goto out_err; } return 0; -- 2.25.1 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel