diff options
Diffstat (limited to 'sound/soc/codecs/wm8962.c')
-rw-r--r-- | sound/soc/codecs/wm8962.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/sound/soc/codecs/wm8962.c b/sound/soc/codecs/wm8962.c index 1be4eb364128..296de4e30d26 100644 --- a/sound/soc/codecs/wm8962.c +++ b/sound/soc/codecs/wm8962.c | |||
@@ -3878,13 +3878,17 @@ static int wm8962_gpio_direction_out(struct gpio_chip *chip, | |||
3878 | { | 3878 | { |
3879 | struct wm8962_priv *wm8962 = gpio_to_wm8962(chip); | 3879 | struct wm8962_priv *wm8962 = gpio_to_wm8962(chip); |
3880 | struct snd_soc_codec *codec = wm8962->codec; | 3880 | struct snd_soc_codec *codec = wm8962->codec; |
3881 | int val; | 3881 | int ret, val; |
3882 | 3882 | ||
3883 | /* Force function 1 (logic output) */ | 3883 | /* Force function 1 (logic output) */ |
3884 | val = (1 << WM8962_GP2_FN_SHIFT) | (value << WM8962_GP2_LVL_SHIFT); | 3884 | val = (1 << WM8962_GP2_FN_SHIFT) | (value << WM8962_GP2_LVL_SHIFT); |
3885 | 3885 | ||
3886 | return snd_soc_update_bits(codec, WM8962_GPIO_BASE + offset, | 3886 | ret = snd_soc_update_bits(codec, WM8962_GPIO_BASE + offset, |
3887 | WM8962_GP2_FN_MASK | WM8962_GP2_LVL, val); | 3887 | WM8962_GP2_FN_MASK | WM8962_GP2_LVL, val); |
3888 | if (ret < 0) | ||
3889 | return ret; | ||
3890 | |||
3891 | return 0; | ||
3888 | } | 3892 | } |
3889 | 3893 | ||
3890 | static struct gpio_chip wm8962_template_chip = { | 3894 | static struct gpio_chip wm8962_template_chip = { |