Skip to content

Commit

Permalink
net: dsa: hellcreek: Remove redundant dev_err call in hellcreek_probe()
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 <hulkci@huawei.com>
Signed-off-by: Guobin Huang <huangguobin4@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Guobin Huang authored and David S. Miller committed Mar 29, 2021
1 parent 8e99ca3 commit 656151a
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions drivers/net/dsa/hirschmann/hellcreek.c
Original file line number Diff line number Diff line change
Expand Up @@ -1842,10 +1842,8 @@ static int hellcreek_probe(struct platform_device *pdev)
}

hellcreek->base = devm_ioremap_resource(dev, res);
if (IS_ERR(hellcreek->base)) {
dev_err(dev, "No memory available!\n");
if (IS_ERR(hellcreek->base))
return PTR_ERR(hellcreek->base);
}

res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "ptp");
if (!res) {
Expand All @@ -1854,10 +1852,8 @@ static int hellcreek_probe(struct platform_device *pdev)
}

hellcreek->ptp_base = devm_ioremap_resource(dev, res);
if (IS_ERR(hellcreek->ptp_base)) {
dev_err(dev, "No memory available!\n");
if (IS_ERR(hellcreek->ptp_base))
return PTR_ERR(hellcreek->ptp_base);
}

ret = hellcreek_detect(hellcreek);
if (ret) {
Expand Down

0 comments on commit 656151a

Please sign in to comment.