diff mbox

[1/7] ASoC: atmel: Remove redundant dev_err() call in probe function

Message ID 20180130110654.GB18123@lenoch (mailing list archive)
State Accepted
Commit 1f598e6861ab1d3cc46d6eff155c0a0a6736de38
Headers show

Commit Message

Ladislav Michl Jan. 30, 2018, 11:06 a.m. UTC
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>
---
 sound/soc/atmel/atmel-classd.c | 7 ++-----
 sound/soc/atmel/atmel-pdmic.c  | 7 ++-----
 2 files changed, 4 insertions(+), 10 deletions(-)

Comments

Alexandre Belloni Feb. 27, 2018, 4:54 p.m. UTC | #1
Hi,

On 30/01/2018 at 12:06:54 +0100, Ladislav Michl wrote:
> There is an error message within devm_ioremap_resource already,
> so remove the redundant dev_err() call.
> 

That one can be sent as-is, don't forget to send to Mark Brown as he is
the asoc maintainer.

> Signed-off-by: Ladislav Michl <ladis@linux-mips.org>
> ---
>  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 ebabed69f0e6..540f0b6a95aa 100644
> --- a/sound/soc/atmel/atmel-classd.c
> +++ b/sound/soc/atmel/atmel-classd.c
> @@ -580,11 +580,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;
>  
> diff --git a/sound/soc/atmel/atmel-pdmic.c b/sound/soc/atmel/atmel-pdmic.c
> index 8e3d34be9e69..0729f656f7eb 100644
> --- a/sound/soc/atmel/atmel-pdmic.c
> +++ b/sound/soc/atmel/atmel-pdmic.c
> @@ -629,11 +629,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.15.1
>
Nicolas Ferre Feb. 27, 2018, 5:13 p.m. UTC | #2
On 27/02/2018 at 17:54, Alexandre Belloni wrote:
> Hi,
> 
> On 30/01/2018 at 12:06:54 +0100, Ladislav Michl wrote:
>> There is an error message within devm_ioremap_resource already,
>> so remove the redundant dev_err() call.
>>
> 
> That one can be sent as-is, don't forget to send to Mark Brown as he is
> the asoc maintainer.

Good, you can add my:
Acked-by: Nicolas Ferre <nicolas.ferre@microchip.com>


>> Signed-off-by: Ladislav Michl <ladis@linux-mips.org>
>> ---
>>   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 ebabed69f0e6..540f0b6a95aa 100644
>> --- a/sound/soc/atmel/atmel-classd.c
>> +++ b/sound/soc/atmel/atmel-classd.c
>> @@ -580,11 +580,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;
>>   
>> diff --git a/sound/soc/atmel/atmel-pdmic.c b/sound/soc/atmel/atmel-pdmic.c
>> index 8e3d34be9e69..0729f656f7eb 100644
>> --- a/sound/soc/atmel/atmel-pdmic.c
>> +++ b/sound/soc/atmel/atmel-pdmic.c
>> @@ -629,11 +629,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.15.1
>>
>
diff mbox

Patch

diff --git a/sound/soc/atmel/atmel-classd.c b/sound/soc/atmel/atmel-classd.c
index ebabed69f0e6..540f0b6a95aa 100644
--- a/sound/soc/atmel/atmel-classd.c
+++ b/sound/soc/atmel/atmel-classd.c
@@ -580,11 +580,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;
 
diff --git a/sound/soc/atmel/atmel-pdmic.c b/sound/soc/atmel/atmel-pdmic.c
index 8e3d34be9e69..0729f656f7eb 100644
--- a/sound/soc/atmel/atmel-pdmic.c
+++ b/sound/soc/atmel/atmel-pdmic.c
@@ -629,11 +629,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;