diff options
author | Joonyoung Shim <jy0922.shim@samsung.com> | 2013-03-26 01:41:05 -0400 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2013-03-26 10:10:02 -0400 |
commit | 0eaa6cca1f75e12e4f5ec62cbe887330fe3b5fe9 (patch) | |
tree | 0ae1125a2bda793e13abf8ec55dc36a1eb145daf | |
parent | f7ba716f1e704a00d682a8697108f9c86497c551 (diff) |
ASoC: core: Fix to check return value of snd_soc_update_bits_locked()
It can be 0 or 1 return value of snd_soc_update_bits_locked() when it is
success. So just check return value is negative.
Signed-off-by: Joonyoung Shim <jy0922.shim@samsung.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: stable@vger.kernel.org
-rw-r--r-- | sound/soc/soc-core.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c index 507d251916af..ff4b45a5d796 100644 --- a/sound/soc/soc-core.c +++ b/sound/soc/soc-core.c | |||
@@ -2963,7 +2963,7 @@ int snd_soc_put_volsw_range(struct snd_kcontrol *kcontrol, | |||
2963 | val = val << shift; | 2963 | val = val << shift; |
2964 | 2964 | ||
2965 | ret = snd_soc_update_bits_locked(codec, reg, val_mask, val); | 2965 | ret = snd_soc_update_bits_locked(codec, reg, val_mask, val); |
2966 | if (ret != 0) | 2966 | if (ret < 0) |
2967 | return ret; | 2967 | return ret; |
2968 | 2968 | ||
2969 | if (snd_soc_volsw_is_stereo(mc)) { | 2969 | if (snd_soc_volsw_is_stereo(mc)) { |