summaryrefslogtreecommitdiff
path: root/sound/soc/soc-ac97.c
diff options
context:
space:
mode:
Diffstat (limited to 'sound/soc/soc-ac97.c')
-rw-r--r--sound/soc/soc-ac97.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/sound/soc/soc-ac97.c b/sound/soc/soc-ac97.c
index c086786e4471..906106ed8ca1 100644
--- a/sound/soc/soc-ac97.c
+++ b/sound/soc/soc-ac97.c
@@ -82,13 +82,12 @@ static int snd_soc_ac97_gpio_get(struct gpio_chip *chip, unsigned offset)
struct snd_soc_component *component = gpio_to_component(chip);
int ret;
- if (snd_soc_component_read(component, AC97_GPIO_STATUS, &ret) < 0)
- ret = -1;
+ ret = snd_soc_component_read(component, AC97_GPIO_STATUS);
dev_dbg(component->dev, "get gpio %d : %d\n", offset,
- ret < 0 ? ret : ret & (1 << offset));
+ ret & (1 << offset));
- return ret < 0 ? ret : !!(ret & (1 << offset));
+ return !!(ret & (1 << offset));
}
static void snd_soc_ac97_gpio_set(struct gpio_chip *chip, unsigned offset,