All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2] ASoC: atmel: Remove redundant dev_err() call in probe function
@ 2018-03-01 13:37 Ladislav Michl
  2018-03-01 13:42 ` Alexandre Belloni
  0 siblings, 1 reply; 2+ messages in thread
From: Ladislav Michl @ 2018-03-01 13:37 UTC (permalink / raw)
  To: alsa-devel; +Cc: Mark Brown, Alexandre Belloni, Nicolas Ferre

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

Signed-off-by: Ladislav Michl <ladis@linux-mips.org>
Acked-by: Nicolas Ferre <nicolas.ferre@microchip.com>
---
 Changes:
 - v2: None, just added Ack.

 sound/soc/atmel/atmel-classd.c | 7 ++-----
 sound/soc/atmel/atmel-pdmic.c  | 7 ++-----
 2 files changed, 4 insertions(+), 10 deletions(-)

diff --git a/sound/soc/atmel/atmel-classd.c b/sound/soc/atmel/atmel-classd.c
index 9baaf6bc5fbd..3d70061901a0 100644
--- a/sound/soc/atmel/atmel-classd.c
+++ b/sound/soc/atmel/atmel-classd.c
@@ -583,11 +583,8 @@ static int atmel_classd_probe(struct platform_device *pdev)
 
 	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
 	io_base = devm_ioremap_resource(dev, res);
-	if (IS_ERR(io_base)) {
-		ret =  PTR_ERR(io_base);
-		dev_err(dev, "failed to remap register memory: %d\n", ret);
-		return ret;
-	}
+	if (IS_ERR(io_base))
+		return PTR_ERR(io_base);
 
 	dd->phy_base = res->start;
 	dd->dev = dev;
diff --git a/sound/soc/atmel/atmel-pdmic.c b/sound/soc/atmel/atmel-pdmic.c
index 94f852574a44..915c2b064de1 100644
--- a/sound/soc/atmel/atmel-pdmic.c
+++ b/sound/soc/atmel/atmel-pdmic.c
@@ -633,11 +633,8 @@ static int atmel_pdmic_probe(struct platform_device *pdev)
 
 	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
 	io_base = devm_ioremap_resource(dev, res);
-	if (IS_ERR(io_base)) {
-		ret = PTR_ERR(io_base);
-		dev_err(dev, "failed to remap register memory: %d\n", ret);
-		return ret;
-	}
+	if (IS_ERR(io_base))
+		return PTR_ERR(io_base);
 
 	dd->phy_base = res->start;
 
-- 
2.16.2

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH v2] ASoC: atmel: Remove redundant dev_err() call in probe function
  2018-03-01 13:37 [PATCH v2] ASoC: atmel: Remove redundant dev_err() call in probe function Ladislav Michl
@ 2018-03-01 13:42 ` Alexandre Belloni
  0 siblings, 0 replies; 2+ messages in thread
From: Alexandre Belloni @ 2018-03-01 13:42 UTC (permalink / raw)
  To: Ladislav Michl; +Cc: alsa-devel, Mark Brown, Nicolas Ferre

On 01/03/2018 at 14:37:31 +0100, Ladislav Michl wrote:
> There is an error message within devm_ioremap_resource already,
> so remove the redundant dev_err() call.
> 
> Signed-off-by: Ladislav Michl <ladis@linux-mips.org>
> Acked-by: Nicolas Ferre <nicolas.ferre@microchip.com>
Acked-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>

> ---
>  Changes:
>  - v2: None, just added Ack.
> 
>  sound/soc/atmel/atmel-classd.c | 7 ++-----
>  sound/soc/atmel/atmel-pdmic.c  | 7 ++-----
>  2 files changed, 4 insertions(+), 10 deletions(-)
> 
> diff --git a/sound/soc/atmel/atmel-classd.c b/sound/soc/atmel/atmel-classd.c
> index 9baaf6bc5fbd..3d70061901a0 100644
> --- a/sound/soc/atmel/atmel-classd.c
> +++ b/sound/soc/atmel/atmel-classd.c
> @@ -583,11 +583,8 @@ static int atmel_classd_probe(struct platform_device *pdev)
>  
>  	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
>  	io_base = devm_ioremap_resource(dev, res);
> -	if (IS_ERR(io_base)) {
> -		ret =  PTR_ERR(io_base);
> -		dev_err(dev, "failed to remap register memory: %d\n", ret);
> -		return ret;
> -	}
> +	if (IS_ERR(io_base))
> +		return PTR_ERR(io_base);
>  
>  	dd->phy_base = res->start;
>  	dd->dev = dev;
> diff --git a/sound/soc/atmel/atmel-pdmic.c b/sound/soc/atmel/atmel-pdmic.c
> index 94f852574a44..915c2b064de1 100644
> --- a/sound/soc/atmel/atmel-pdmic.c
> +++ b/sound/soc/atmel/atmel-pdmic.c
> @@ -633,11 +633,8 @@ static int atmel_pdmic_probe(struct platform_device *pdev)
>  
>  	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
>  	io_base = devm_ioremap_resource(dev, res);
> -	if (IS_ERR(io_base)) {
> -		ret = PTR_ERR(io_base);
> -		dev_err(dev, "failed to remap register memory: %d\n", ret);
> -		return ret;
> -	}
> +	if (IS_ERR(io_base))
> +		return PTR_ERR(io_base);
>  
>  	dd->phy_base = res->start;
>  
> -- 
> 2.16.2
> 

-- 
Alexandre Belloni, Bootlin (formerly Free Electrons)
Embedded Linux and Kernel engineering
https://bootlin.com

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2018-03-01 13:42 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-03-01 13:37 [PATCH v2] ASoC: atmel: Remove redundant dev_err() call in probe function Ladislav Michl
2018-03-01 13:42 ` Alexandre Belloni

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.