diff mbox series

[v2,-next] phy: phy-mtk-hdmi: Remove redundant dev_err call in mtk_hdmi_phy_probe()

Message ID 20210408115530.15673-1-heying24@huawei.com
State Accepted
Commit 10d2dece591be8c465fb07291ae0263400209d11
Headers show
Series [v2,-next] phy: phy-mtk-hdmi: Remove redundant dev_err call in mtk_hdmi_phy_probe() | expand

Commit Message

He Ying April 8, 2021, 11:55 a.m. UTC
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: He Ying <heying24@huawei.com>
---
v2:
- Use 'return PTR_ERR()' instead of 'ret = PTR_ERR();return ret;'.

 drivers/phy/mediatek/phy-mtk-hdmi.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

Comments

Chunfeng Yun (云春峰) April 9, 2021, 1:34 a.m. UTC | #1
On Thu, 2021-04-08 at 07:55 -0400, He Ying wrote:
> 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: He Ying <heying24@huawei.com>
> ---
> v2:
> - Use 'return PTR_ERR()' instead of 'ret = PTR_ERR();return ret;'.
> 
>  drivers/phy/mediatek/phy-mtk-hdmi.c | 4 +---
>  1 file changed, 1 insertion(+), 3 deletions(-)
> 
> diff --git a/drivers/phy/mediatek/phy-mtk-hdmi.c b/drivers/phy/mediatek/phy-mtk-hdmi.c
> index 8313bd517e4c..8ad8f717ef43 100644
> --- a/drivers/phy/mediatek/phy-mtk-hdmi.c
> +++ b/drivers/phy/mediatek/phy-mtk-hdmi.c
> @@ -119,9 +119,7 @@ static int mtk_hdmi_phy_probe(struct platform_device *pdev)
>  	mem = platform_get_resource(pdev, IORESOURCE_MEM, 0);
>  	hdmi_phy->regs = devm_ioremap_resource(dev, mem);
>  	if (IS_ERR(hdmi_phy->regs)) {
> -		ret = PTR_ERR(hdmi_phy->regs);
> -		dev_err(dev, "Failed to get memory resource: %d\n", ret);
> -		return ret;
> +		return PTR_ERR(hdmi_phy->regs);
>  	}
Reviewed-by: Chunfeng Yun <chunfeng.yun@mediatek.com>

Thanks a lot
>  
>  	ref_clk = devm_clk_get(dev, "pll_ref");
diff mbox series

Patch

diff --git a/drivers/phy/mediatek/phy-mtk-hdmi.c b/drivers/phy/mediatek/phy-mtk-hdmi.c
index 8313bd517e4c..8ad8f717ef43 100644
--- a/drivers/phy/mediatek/phy-mtk-hdmi.c
+++ b/drivers/phy/mediatek/phy-mtk-hdmi.c
@@ -119,9 +119,7 @@  static int mtk_hdmi_phy_probe(struct platform_device *pdev)
 	mem = platform_get_resource(pdev, IORESOURCE_MEM, 0);
 	hdmi_phy->regs = devm_ioremap_resource(dev, mem);
 	if (IS_ERR(hdmi_phy->regs)) {
-		ret = PTR_ERR(hdmi_phy->regs);
-		dev_err(dev, "Failed to get memory resource: %d\n", ret);
-		return ret;
+		return PTR_ERR(hdmi_phy->regs);
 	}
 
 	ref_clk = devm_clk_get(dev, "pll_ref");