Skip to contentSkip to conversation

media: ti-vpe: sc: remove redundant dev_err call in sc_create()

PATCH In review Yang Yingliang 2 participants 2 messages Apr 1, 2021 – Apr 2, 2021 Media (V4L/DVB)

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 media: ti-vpe: sc: remove redundant dev_err call in sc_create()

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

---
 drivers/media/platform/ti-vpe/sc.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/media/platform/ti-vpe/sc.c +1 -3
index 98f95082a6fd..0202d278523f 100644
@@ -294,10 +294,8 @@ struct sc_data *sc_create(struct platform_device *pdev, const char *res_name)
 	}
 
 	sc->base = devm_ioremap_resource(&pdev->dev, sc->res);
-	if (IS_ERR(sc->base)) {
-		dev_err(&pdev->dev, "failed to ioremap\n");
+	if (IS_ERR(sc->base))
 		return ERR_CAST(sc->base);
-	}
 
 	return sc;
 }
Signature · 1 line
2.25.1
Reviewed-by on v1 1/1
#1 lore raw

Yang,

Thank you for the patch.

Yang Yingliang <[email protected]> wrote on Thu [2021-Apr-01 18:30:15 +0800]:

Quoted 15 lines

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

---
 drivers/media/platform/ti-vpe/sc.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/media/platform/ti-vpe/sc.c +0 -0
index 98f95082a6fd..0202d278523f 100644

drivers/media/platform/ti-vpe/sc.c struct sc_data *sc_create(struct platform_device *pdev, const char *res_name) · line 300

Quoted 8 lines
drivers/media/platform/ti-vpe/sc.c +1 -3
@@ -294,10 +294,8 @@ struct sc_data *sc_create(struct platform_device *pdev, const char *res_name)
 	}
 
 	sc->base = devm_ioremap_resource(&pdev->dev, sc->res);
-	if (IS_ERR(sc->base)) {
-		dev_err(&pdev->dev, "failed to ioremap\n");
+	if (IS_ERR(sc->base))
 		return ERR_CAST(sc->base);
-	}
Quoted 6 lines
drivers/media/platform/ti-vpe/sc.c +0 -0
 	return sc;
 }
Signature · 1 line
2.25.1