From mboxrd@z Thu Jan 1 00:00:00 1970 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 D2F8AC433F5 for ; Tue, 4 Jan 2022 15:12:53 +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:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=FlfBJHS7aUl2RT4NTcRyPn7ytiWebQZCrugjn8rjEJo=; b=lZkwq+dTnH4lCy 1TIhnPhBPd2++NxoSjsXhRc5eyHF+yNexvbfmd2Ob2o85Wsu05dLAXfl7b/ilylZIv+pYS/Y/QxBA vuAVb/Kv7lBczUZT7uq7QTDFHLf20cvlBe4T70cLcEDm24ZtPEunSL70SbYbBHSwr1FV1nE0dIPPj ZtPZCiqV3iiL8jKpERu3TEFnGDNVEP0qO5vvJnHbIBulTIsBTENgi55PTKSrG8OZb2WGZGc4BHUj2 edhjJs7jzr1zm7Wag03vEpZ2dHHCyRjUjhTaGwrbYNr4ieZwGVrTcubdFadUWmDyRGdWrQ2zT3kFr yjny5Sy6PXFX4CrN418A==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1n4lTM-00Btqs-F2; Tue, 04 Jan 2022 15:11:36 +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 1n4lTH-00BtpE-Hx for linux-arm-kernel@lists.infradead.org; Tue, 04 Jan 2022 15:11: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 190FDB816B7; Tue, 4 Jan 2022 15:11:30 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id D0641C36AE9; Tue, 4 Jan 2022 15:11:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1641309088; bh=bJMLAxfxFS5DwU5X/+9RBjzIE6aeFEH+//oc3YJvXWw=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=TJ1klds9TgLNQlVlBFja//uq8Bi9X+u8hgQyT/FKRv8fWbHbejNZvaLqDW8HxXEsL chqa+MwZ99RQMFEa9nzT/nQ8E86pQ9GG79c02rZbbVt+4hkfKa64e3YwYjQrYGnXWd 8xhkOmFi/cY4S15r+94MsYgGX5+GaoHSux6xCLH172paWGIcCcpefJ8Ax3NVJkIIDL 5MMhmiz8BmIk9v7ya8vV+bhWmJZC8WDZ28OaHNRi/WDYhilrhMIpJKY9f1ZCcUvdOQ VQK7YxT4gb3vG9dOVoO9zWIWERoidixJroWqKD0Qj77BDrknp6GbXEmP1ablCviH0/ Uk9X5H4lImI/g== Date: Tue, 4 Jan 2022 15:11:23 +0000 From: Will Deacon To: Yang Yingliang Cc: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, bbudiredla@marvell.com Subject: Re: [PATCH -next] perf/marvell_cn10k_tad_pmu: Fix return value check in tad_pmu_probe() Message-ID: <20220104151123.GA2005@willie-the-truck> References: <20211221112252.306558-1-yangyingliang@huawei.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20211221112252.306558-1-yangyingliang@huawei.com> User-Agent: Mutt/1.10.1 (2018-07-13) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220104_071131_765846_5760D4F9 X-CRM114-Status: GOOD ( 20.24 ) 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 On Tue, Dec 21, 2021 at 07:22:52PM +0800, Yang Yingliang wrote: > In case of error, the function devm_ioremap() returns NULL > pointer not ERR_PTR(). The IS_ERR() test in the return value > check should be replaced with NULL test. > > Fixes: 036a7584bede ("drivers: perf: Add LLC-TAD perf counter support") > Reported-by: Hulk Robot > Signed-off-by: Yang Yingliang > --- > drivers/perf/marvell_cn10k_tad_pmu.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/perf/marvell_cn10k_tad_pmu.c b/drivers/perf/marvell_cn10k_tad_pmu.c > index 250dd4c52d70..7f4d292658e3 100644 > --- a/drivers/perf/marvell_cn10k_tad_pmu.c > +++ b/drivers/perf/marvell_cn10k_tad_pmu.c > @@ -312,7 +312,7 @@ static int tad_pmu_probe(struct platform_device *pdev) > regions[i].base = devm_ioremap(&pdev->dev, > res->start, > tad_pmu_page_size); > - if (IS_ERR(regions[i].base)) { > + if (!regions[i].base) { > dev_err(&pdev->dev, "TAD%d ioremap fail\n", i); > return -ENOMEM; Thanks, but Dan already caught this: https://lore.kernel.org/r/20211217145907.GA16611@kili I'll push out his fix soon. Will _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel