Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752731AbeAQLVs (ORCPT + 1 other); Wed, 17 Jan 2018 06:21:48 -0500 Received: from szxga07-in.huawei.com ([45.249.212.35]:50544 "EHLO huawei.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1750846AbeAQLVq (ORCPT ); Wed, 17 Jan 2018 06:21:46 -0500 From: Wei Yongjun To: Shaokun Zhang CC: Wei Yongjun , , Subject: [PATCH -next] perf: hisi: Remove redundant dev_err call Date: Wed, 17 Jan 2018 11:28:14 +0000 Message-ID: <1516188494-147057-1-git-send-email-weiyongjun1@huawei.com> X-Mailer: git-send-email 1.8.3.1 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 7bit MIME-Version: 1.0 X-Originating-IP: [10.175.113.25] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Return-Path: There is a error message within devm_ioremap_resource already, so remove the dev_err call to avoid redundant error message. Signed-off-by: Wei Yongjun --- drivers/perf/hisilicon/hisi_uncore_ddrc_pmu.c | 4 +--- drivers/perf/hisilicon/hisi_uncore_hha_pmu.c | 4 +--- drivers/perf/hisilicon/hisi_uncore_l3c_pmu.c | 4 +--- 3 file changed, 3 insertion(+), 9 deletions(-) diff --git a/drivers/perf/hisilicon/hisi_uncore_ddrc_pmu.c b/drivers/perf/hisilicon/hisi_uncore_ddrc_pmu.c index 1b10ea0..deb11d2 100644 --- a/drivers/perf/hisilicon/hisi_uncore_ddrc_pmu.c +++ b/drivers/perf/hisilicon/hisi_uncore_ddrc_pmu.c @@ -270,10 +270,8 @@ static int hisi_ddrc_pmu_init_data(struct platform_device *pdev, res = platform_get_resource(pdev, IORESOURCE_MEM, 0); ddrc_pmu->base = devm_ioremap_resource(&pdev->dev, res); - if (IS_ERR(ddrc_pmu->base)) { - dev_err(&pdev->dev, "ioremap failed for ddrc_pmu resource\n"); + if (IS_ERR(ddrc_pmu->base)) return PTR_ERR(ddrc_pmu->base); - } return 0; } diff --git a/drivers/perf/hisilicon/hisi_uncore_hha_pmu.c b/drivers/perf/hisilicon/hisi_uncore_hha_pmu.c index 443906e..dbf7629 100644 --- a/drivers/perf/hisilicon/hisi_uncore_hha_pmu.c +++ b/drivers/perf/hisilicon/hisi_uncore_hha_pmu.c @@ -263,10 +263,8 @@ static int hisi_hha_pmu_init_data(struct platform_device *pdev, res = platform_get_resource(pdev, IORESOURCE_MEM, 0); hha_pmu->base = devm_ioremap_resource(&pdev->dev, res); - if (IS_ERR(hha_pmu->base)) { - dev_err(&pdev->dev, "ioremap failed for hha_pmu resource\n"); + if (IS_ERR(hha_pmu->base)) return PTR_ERR(hha_pmu->base); - } return 0; } diff --git a/drivers/perf/hisilicon/hisi_uncore_l3c_pmu.c b/drivers/perf/hisilicon/hisi_uncore_l3c_pmu.c index 0bde5d9..8d79d88 100644 --- a/drivers/perf/hisilicon/hisi_uncore_l3c_pmu.c +++ b/drivers/perf/hisilicon/hisi_uncore_l3c_pmu.c @@ -266,10 +266,8 @@ static int hisi_l3c_pmu_init_data(struct platform_device *pdev, res = platform_get_resource(pdev, IORESOURCE_MEM, 0); l3c_pmu->base = devm_ioremap_resource(&pdev->dev, res); - if (IS_ERR(l3c_pmu->base)) { - dev_err(&pdev->dev, "ioremap failed for l3c_pmu resource\n"); + if (IS_ERR(l3c_pmu->base)) return PTR_ERR(l3c_pmu->base); - } return 0; }