diff mbox series

[v2] media: rcar_drif: Remove devm_ioremap_resource() error printing

Message ID 20190301093831.11106-1-geert+renesas@glider.be (mailing list archive)
State New
Delegated to: Kieran Bingham
Headers show
Series [v2] media: rcar_drif: Remove devm_ioremap_resource() error printing | expand

Commit Message

Geert Uytterhoeven March 1, 2019, 9:38 a.m. UTC
devm_ioremap_resource() already prints an error message on failure, so
there is no need to repeat that.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
v2:
  - Drop assignment to ret.
---
 drivers/media/platform/rcar_drif.c | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

Comments

Niklas Söderlund March 2, 2019, 10:09 a.m. UTC | #1
Hi Geert,

Thanks for your patch.

On 2019-03-01 10:38:31 +0100, Geert Uytterhoeven wrote:
> devm_ioremap_resource() already prints an error message on failure, so
> there is no need to repeat that.
> 
> Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>

Reviewed-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>

> ---
> v2:
>   - Drop assignment to ret.
> ---
>  drivers/media/platform/rcar_drif.c | 8 +++-----
>  1 file changed, 3 insertions(+), 5 deletions(-)
> 
> diff --git a/drivers/media/platform/rcar_drif.c b/drivers/media/platform/rcar_drif.c
> index c417ff8f6fe548f3..608e5217ccd50a1b 100644
> --- a/drivers/media/platform/rcar_drif.c
> +++ b/drivers/media/platform/rcar_drif.c
> @@ -1405,11 +1405,9 @@ static int rcar_drif_probe(struct platform_device *pdev)
>  	/* Register map */
>  	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
>  	ch->base = devm_ioremap_resource(&pdev->dev, res);
> -	if (IS_ERR(ch->base)) {
> -		ret = PTR_ERR(ch->base);
> -		dev_err(&pdev->dev, "ioremap failed (%d)\n", ret);
> -		return ret;
> -	}
> +	if (IS_ERR(ch->base))
> +		return PTR_ERR(ch->base);
> +
>  	ch->start = res->start;
>  	platform_set_drvdata(pdev, ch);
>  
> -- 
> 2.17.1
>
Simon Horman March 6, 2019, 12:52 p.m. UTC | #2
On Fri, Mar 01, 2019 at 10:38:31AM +0100, Geert Uytterhoeven wrote:
> devm_ioremap_resource() already prints an error message on failure, so
> there is no need to repeat that.
> 
> Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
> ---
> v2:
>   - Drop assignment to ret.

Reviewed-by: Simon Horman <horms+renesas@verge.net.au>
diff mbox series

Patch

diff --git a/drivers/media/platform/rcar_drif.c b/drivers/media/platform/rcar_drif.c
index c417ff8f6fe548f3..608e5217ccd50a1b 100644
--- a/drivers/media/platform/rcar_drif.c
+++ b/drivers/media/platform/rcar_drif.c
@@ -1405,11 +1405,9 @@  static int rcar_drif_probe(struct platform_device *pdev)
 	/* Register map */
 	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
 	ch->base = devm_ioremap_resource(&pdev->dev, res);
-	if (IS_ERR(ch->base)) {
-		ret = PTR_ERR(ch->base);
-		dev_err(&pdev->dev, "ioremap failed (%d)\n", ret);
-		return ret;
-	}
+	if (IS_ERR(ch->base))
+		return PTR_ERR(ch->base);
+
 	ch->start = res->start;
 	platform_set_drvdata(pdev, ch);