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

Signed-off-by: Chen Hui <clare.chen...@huawei.com>
---
 drivers/gpu/drm/mediatek/mtk_disp_color.c | 4 +---
 drivers/gpu/drm/mediatek/mtk_disp_gamma.c | 4 +---
 2 files changed, 2 insertions(+), 6 deletions(-)

diff --git a/drivers/gpu/drm/mediatek/mtk_disp_color.c 
b/drivers/gpu/drm/mediatek/mtk_disp_color.c
index 63f411ab393b..d9b6f3b100dc 100644
--- a/drivers/gpu/drm/mediatek/mtk_disp_color.c
+++ b/drivers/gpu/drm/mediatek/mtk_disp_color.c
@@ -112,10 +112,8 @@ static int mtk_disp_color_probe(struct platform_device 
*pdev)
 
        res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
        priv->regs = devm_ioremap_resource(dev, res);
-       if (IS_ERR(priv->regs)) {
-               dev_err(dev, "failed to ioremap color\n");
+       if (IS_ERR(priv->regs))
                return PTR_ERR(priv->regs);
-       }
 #if IS_REACHABLE(CONFIG_MTK_CMDQ)
        ret = cmdq_dev_get_client_reg(dev, &priv->cmdq_reg, 0);
        if (ret)
diff --git a/drivers/gpu/drm/mediatek/mtk_disp_gamma.c 
b/drivers/gpu/drm/mediatek/mtk_disp_gamma.c
index 3ebf91e0ab41..ad5df3f9d477 100644
--- a/drivers/gpu/drm/mediatek/mtk_disp_gamma.c
+++ b/drivers/gpu/drm/mediatek/mtk_disp_gamma.c
@@ -146,10 +146,8 @@ static int mtk_disp_gamma_probe(struct platform_device 
*pdev)
 
        res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
        priv->regs = devm_ioremap_resource(dev, res);
-       if (IS_ERR(priv->regs)) {
-               dev_err(dev, "failed to ioremap gamma\n");
+       if (IS_ERR(priv->regs))
                return PTR_ERR(priv->regs);
-       }
 
 #if IS_REACHABLE(CONFIG_MTK_CMDQ)
        ret = cmdq_dev_get_client_reg(dev, &priv->cmdq_reg, 0);
-- 
2.17.1

Reply via email to