Alsa-Devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ASoC: tas2552: Propagate the error code in suspend/resume
@ 2017-04-25  0:43 Fabio Estevam
  2017-04-25 12:12 ` Dan Murphy
  0 siblings, 1 reply; 2+ messages in thread
From: Fabio Estevam @ 2017-04-25  0:43 UTC (permalink / raw)
  To: broonie; +Cc: Fabio Estevam, alsa-devel, dmurphy

From: Fabio Estevam <fabio.estevam@nxp.com>

tas2552_suspend() and tas2552_resume() currently always return success,
even though they may fail.

Fix this behaviour by always propagating the error code.

Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com>
---
 sound/soc/codecs/tas2552.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/sound/soc/codecs/tas2552.c b/sound/soc/codecs/tas2552.c
index fd5251e..8840f72 100644
--- a/sound/soc/codecs/tas2552.c
+++ b/sound/soc/codecs/tas2552.c
@@ -637,7 +637,7 @@ static int tas2552_suspend(struct snd_soc_codec *codec)
 	if (ret != 0)
 		dev_err(codec->dev, "Failed to disable supplies: %d\n",
 			ret);
-	return 0;
+	return ret;
 }
 
 static int tas2552_resume(struct snd_soc_codec *codec)
@@ -653,7 +653,7 @@ static int tas2552_resume(struct snd_soc_codec *codec)
 			ret);
 	}
 
-	return 0;
+	return ret;
 }
 #else
 #define tas2552_suspend NULL
-- 
2.7.4

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

* Re: [PATCH] ASoC: tas2552: Propagate the error code in suspend/resume
  2017-04-25  0:43 [PATCH] ASoC: tas2552: Propagate the error code in suspend/resume Fabio Estevam
@ 2017-04-25 12:12 ` Dan Murphy
  0 siblings, 0 replies; 2+ messages in thread
From: Dan Murphy @ 2017-04-25 12:12 UTC (permalink / raw)
  To: Fabio Estevam, broonie; +Cc: Fabio Estevam, alsa-devel

On 04/24/2017 07:43 PM, Fabio Estevam wrote:
> From: Fabio Estevam <fabio.estevam@nxp.com>
> 
> tas2552_suspend() and tas2552_resume() currently always return success,
> even though they may fail.
> 
> Fix this behaviour by always propagating the error code.
> 
> Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com>

Reviewed-by: Dan Murphy <dmurphy@ti.com>

> ---
>  sound/soc/codecs/tas2552.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/sound/soc/codecs/tas2552.c b/sound/soc/codecs/tas2552.c
> index fd5251e..8840f72 100644
> --- a/sound/soc/codecs/tas2552.c
> +++ b/sound/soc/codecs/tas2552.c
> @@ -637,7 +637,7 @@ static int tas2552_suspend(struct snd_soc_codec *codec)
>  	if (ret != 0)
>  		dev_err(codec->dev, "Failed to disable supplies: %d\n",
>  			ret);
> -	return 0;
> +	return ret;
>  }
>  
>  static int tas2552_resume(struct snd_soc_codec *codec)
> @@ -653,7 +653,7 @@ static int tas2552_resume(struct snd_soc_codec *codec)
>  			ret);
>  	}
>  
> -	return 0;
> +	return ret;
>  }
>  #else
>  #define tas2552_suspend NULL
> 


-- 
------------------
Dan Murphy

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

end of thread, other threads:[~2017-04-25 12:12 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-04-25  0:43 [PATCH] ASoC: tas2552: Propagate the error code in suspend/resume Fabio Estevam
2017-04-25 12:12 ` Dan Murphy

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox