Skip to contentSkip to conversation

PM: AVS: remove redundant dev_err call in omap_sr_probe()

PATCH In review Qiheng Lin 2 participants 2 messages Apr 6, 2021

Subsystems (3)
lore
Share & tools
lore

Qiheng Lin

author
#0 lore raw

PATCH 1/1 PM: AVS: remove redundant dev_err call in omap_sr_probe()

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

---
 drivers/soc/ti/smartreflex.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/soc/ti/smartreflex.c +1 -3
index 5376f3d22f31..06cbee5fd254 100644
@@ -846,10 +846,8 @@ static int omap_sr_probe(struct platform_device *pdev)
 
 	mem = platform_get_resource(pdev, IORESOURCE_MEM, 0);
 	sr_info->base = devm_ioremap_resource(&pdev->dev, mem);
-	if (IS_ERR(sr_info->base)) {
-		dev_err(&pdev->dev, "%s: ioremap fail\n", __func__);
+	if (IS_ERR(sr_info->base))
 		return PTR_ERR(sr_info->base);
-	}
 
 	irq = platform_get_resource(pdev, IORESOURCE_IRQ, 0);
 
maintainer Reviewed-by on v1 1/1
#1 lore raw
Quoted 17 lines · Qiheng Lin

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

---
 drivers/soc/ti/smartreflex.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/soc/ti/smartreflex.c +0 -0
index 5376f3d22f31..06cbee5fd254 100644
@@ -846,10 +846,8 @@ static int omap_sr_probe(struct platform_device *pdev)
 

drivers/soc/ti/smartreflex.c static int omap_sr_probe(struct platform_device *pdev) · line 853

Quoted 10 lines
drivers/soc/ti/smartreflex.c +1 -3
 	mem = platform_get_resource(pdev, IORESOURCE_MEM, 0);
 	sr_info->base = devm_ioremap_resource(&pdev->dev, mem);
-	if (IS_ERR(sr_info->base)) {
-		dev_err(&pdev->dev, "%s: ioremap fail\n", __func__);
+	if (IS_ERR(sr_info->base))
 		return PTR_ERR(sr_info->base);
-	}
 
 	irq = platform_get_resource(pdev, IORESOURCE_IRQ, 0);
 
Signature · 3 lines
Regards,
Nishanth Menon
Key (0xDDB5849D1736249D) / Fingerprint: F8A2 8693 54EB 8232 17A3  1A34 DDB5 849D 1736 249D