ASoC: dapm: Fix possible uninitialized variable in snd_soc_dapm_get_volsw()
[firefly-linux-kernel-4.4.55.git] / sound / soc / soc-dapm.c
index afb70a5d4fd3552964917abe09a88c60e0f8c8d7..b670d212a9c39857c26727e9d32458977eab05c1 100644 (file)
@@ -3015,6 +3015,9 @@ int snd_soc_dapm_get_volsw(struct snd_kcontrol *kcontrol,
        }
        mutex_unlock(&card->dapm_mutex);
 
+       if (ret)
+               return ret;
+
        if (invert)
                ucontrol->value.integer.value[0] = max - val;
        else