drivers/perf: Remove redundant dev_err call in tx2_uncore_pmu_init_dev()
authorZou Wei <zou_wei@huawei.com>
Tue, 11 May 2021 06:42:44 +0000 (14:42 +0800)
committerWill Deacon <will@kernel.org>
Tue, 25 May 2021 17:57:19 +0000 (18:57 +0100)
There is a error message within devm_ioremap_resource
already, so remove the dev_err call to avoid redundant
error message.

Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Zou Wei <zou_wei@huawei.com>
Link: https://lore.kernel.org/r/1620715364-107460-1-git-send-email-zou_wei@huawei.com
Signed-off-by: Will Deacon <will@kernel.org>
drivers/perf/thunderx2_pmu.c

index 06a6d569b0b56e556ea4917e4717d44821794fb6..fc1a376ee906eb0a5a6b6de3155350a00db04d90 100644 (file)
@@ -817,10 +817,8 @@ static struct tx2_uncore_pmu *tx2_uncore_pmu_init_dev(struct device *dev,
        }
 
        base = devm_ioremap_resource(dev, &res);
-       if (IS_ERR(base)) {
-               dev_err(dev, "PMU type %d: Fail to map resource\n", type);
+       if (IS_ERR(base))
                return NULL;
-       }
 
        tx2_pmu = devm_kzalloc(dev, sizeof(*tx2_pmu), GFP_KERNEL);
        if (!tx2_pmu)