From: Matti J. Aaltonen Date: Fri, 10 Sep 2010 07:41:30 +0000 (+0300) Subject: ASoC: WL1273 FM Radio: Eliminate unnecessary error return value. X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=2c4ee9b579d17006ad9a83f13e3ae15c142dc41e;p=GitHub%2FLineageOS%2Fandroid_kernel_samsung_universal7580.git ASoC: WL1273 FM Radio: Eliminate unnecessary error return value. With this change it's not a error to call wl1273_set_audio_route when the codec is active if the new routing value is the same as the current active setting. Signed-off-by: Matti J. Aaltonen Acked-by: Mark Brown Signed-off-by: Liam Girdwood --- diff --git a/sound/soc/codecs/wl1273.c b/sound/soc/codecs/wl1273.c index 0cd59097088..0c47c788ccd 100644 --- a/sound/soc/codecs/wl1273.c +++ b/sound/soc/codecs/wl1273.c @@ -193,6 +193,9 @@ static int snd_wl1273_set_audio_route(struct snd_kcontrol *kcontrol, struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol); struct wl1273_priv *wl1273 = snd_soc_codec_get_drvdata(codec); + if (wl1273->mode == ucontrol->value.integer.value[0]) + return 0; + /* Do not allow changes while stream is running */ if (codec->active) return -EPERM;