]> git.baikalelectronics.ru Git - kernel.git/commit
ASoC: ad1980: Replace goto loop with do-while loop
authorLars-Peter Clausen <lars@metafoo.de>
Tue, 20 May 2014 12:23:10 +0000 (14:23 +0200)
committerMark Brown <broonie@linaro.org>
Tue, 20 May 2014 21:53:36 +0000 (22:53 +0100)
commit43b271215ab28a8aabf7614a1654e4b095fd0f39
tree9977d42924c430011cceae14fc4f2c5a522e8394
parent55addf3150ef37e6b38d415547cc6f20b4d9aca1
ASoC: ad1980: Replace goto loop with do-while loop

Using a proper do-while loop here instead of a open-coded goto loop is both
cleaner and shorter.

Also fixes the following warnings from smatch:
sound/soc/codecs/ad1980.c:213 ad1980_reset() info: loop could be replaced with if statement.
sound/soc/codecs/ad1980.c:212 ad1980_reset() info: ignoring unreachable code.
sound/soc/codecs/ad1980.c:215 ad1980_reset() info: ignoring unreachable code.

While we are at it also change retry_cnt to unsigned int, using u16 for a
on-stack loop counter doesn't make that much sense.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
sound/soc/codecs/ad1980.c