diff options
author | Guobin Huang <huangguobin4@huawei.com> | 2021-03-27 18:07:18 +0800 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2021-03-28 18:05:31 -0700 |
commit | 656151aaa623c20bbfcbd5b4e43acbea8d23410f (patch) | |
tree | e4ee822f4765da44f8a5df43511ba20080971bdc | |
parent | 8e99ca3fdb31051372b9e8f3a563e59147e0ee10 (diff) |
net: dsa: hellcreek: Remove redundant dev_err call in hellcreek_probe()
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>
-rw-r--r-- | drivers/net/dsa/hirschmann/hellcreek.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/drivers/net/dsa/hirschmann/hellcreek.c b/drivers/net/dsa/hirschmann/hellcreek.c index 918be7eb626f..4d78219da253 100644 --- a/drivers/net/dsa/hirschmann/hellcreek.c +++ b/drivers/net/dsa/hirschmann/hellcreek.c @@ -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) { @@ -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) { |