Skip to content

Commit

Permalink
drivers/perf: Remove redundant dev_err call in tx2_uncore_pmu_init_dev()
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: Zou Wei <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Will Deacon <[email protected]>
  • Loading branch information
SamuelZOU authored and willdeacon committed May 25, 2021
1 parent 77b06dd commit bf2367a
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions drivers/perf/thunderx2_pmu.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit bf2367a

Please sign in to comment.