Skip to contentSkip to conversation

thermal/drivers/hisi: Remove redundant dev_err call in hisi_thermal_probe()

PATCH Applied Ye Bin 2 participants 2 messages Apr 9, 2021 – Apr 27, 2021

Subsystems (2)
lore
Share & tools
lore

Ye Bin

author
#0 lore raw

PATCH 1/1 thermal/drivers/hisi: Remove redundant dev_err call in hisi_thermal_probe()

There is a error message within devm_ioremap_resource already, so remove the dev_err call to avoid redundant error message.

---
 drivers/thermal/hisi_thermal.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/thermal/hisi_thermal.c +1 -3
index d902db9f267f..9a21ac0ceb11 100644
@@ -572,10 +572,8 @@ static int hisi_thermal_probe(struct platform_device *pdev)
 
 	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
 	data->regs = devm_ioremap_resource(dev, res);
-	if (IS_ERR(data->regs)) {
-		dev_err(dev, "failed to get io address\n");
+	if (IS_ERR(data->regs))
 		return PTR_ERR(data->regs);
-	}
 
 	ret = data->ops->probe(data);
 	if (ret)
merge bot Applied
#1 lore raw
The following commit has been merged into the thermal/next branch of thermal:

The following commit has been merged into the thermal/next branch of thermal:

Commit-ID:     beaa41029fdea9d3e01af3a1a800538542d30869
Gitweb:        https://git.kernel.org/pub/scm/linux/kernel/git/thermal/linux.git//beaa41029fdea9d3e01af3a1a800538542d30869
Author:        Ye Bin <[email protected]>
AuthorDate:    Fri, 09 Apr 2021 15:52:24 +08:00
Committer:     Daniel Lezcano <[email protected]>
CommitterDate: Tue, 20 Apr 2021 09:18:57 +02:00

thermal/drivers/hisi: Remove redundant dev_err call in hisi_thermal_probe()

There is a error message within devm_ioremap_resource already, so remove the dev_err call to avoid redundant error message.

---
 drivers/thermal/hisi_thermal.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/thermal/hisi_thermal.c +1 -3
index d902db9..9a21ac0 100644
@@ -572,10 +572,8 @@ static int hisi_thermal_probe(struct platform_device *pdev)
 
 	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
 	data->regs = devm_ioremap_resource(dev, res);
-	if (IS_ERR(data->regs)) {
-		dev_err(dev, "failed to get io address\n");
+	if (IS_ERR(data->regs))
 		return PTR_ERR(data->regs);
-	}
 
 	ret = data->ops->probe(data);
 	if (ret)