]> git.baikalelectronics.ru Git - kernel.git/commit
ASoC: ac97: Be sure to clamp return value
authorLinus Walleij <linus.walleij@linaro.org>
Tue, 22 Dec 2015 14:51:39 +0000 (15:51 +0100)
committerMark Brown <broonie@kernel.org>
Wed, 23 Dec 2015 00:23:01 +0000 (00:23 +0000)
commit5c4295866d48f9aa41064d1df7167234cc10d44c
tree7214384f3c119e6f9ee53495985e5155d3fca214
parentac3ea60bbc3a0efaaa7e56defd7892ce4cd93c04
ASoC: ac97: Be sure to clamp return value

As we want gpio_chip .get() calls to be able to return negative
error codes and propagate to drivers, we need to go over all
drivers and make sure their return values are clamped to [0,1].
We do this by using the ret = !!(val) design pattern.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/soc-ac97.c