[alsa-devel] [PATCH v2] wm8940: remove unnecessary if statements

Jonathan Cameron jic23 at cam.ac.uk
Tue Jun 7 10:01:14 CEST 2011


On 06/06/11 21:53, Greg Dietsche wrote:
> removing unnecessary if(ret) checks
> 
> This updated patch corrects a minor spelling problem in the commit message
> and resolves two other (similar) issues found in wm8940.c by Jonathan Cameron.
> 
Thanks
> Signed-off-by: Greg Dietsche <Gregory.Dietsche at cuw.edu>
Acked-by: Jonathan Cameron <jic23 at cam.ac.uk>
> ---
>  sound/soc/codecs/wm8940.c |    7 -------
>  1 files changed, 0 insertions(+), 7 deletions(-)
> 
> diff --git a/sound/soc/codecs/wm8940.c b/sound/soc/codecs/wm8940.c
> index 25580e3..056daa0 100644
> --- a/sound/soc/codecs/wm8940.c
> +++ b/sound/soc/codecs/wm8940.c
> @@ -297,8 +297,6 @@ static int wm8940_add_widgets(struct snd_soc_codec *codec)
>  	if (ret)
>  		goto error_ret;
>  	ret = snd_soc_dapm_add_routes(dapm, audio_map, ARRAY_SIZE(audio_map));
> -	if (ret)
> -		goto error_ret;
>  
>  error_ret:
>  	return ret;
> @@ -683,8 +681,6 @@ static int wm8940_resume(struct snd_soc_codec *codec)
>  		}
>  	}
>  	ret = wm8940_set_bias_level(codec, SND_SOC_BIAS_STANDBY);
> -	if (ret)
> -		goto error_ret;
>  
>  error_ret:
>  	return ret;
> @@ -730,9 +726,6 @@ static int wm8940_probe(struct snd_soc_codec *codec)
>  	if (ret)
>  		return ret;
>  	ret = wm8940_add_widgets(codec);
> -	if (ret)
> -		return ret;
> -
>  	return ret;
>  }
>  



More information about the Alsa-devel mailing list