• Lars-Peter Clausen's avatar
    ASoC: ad1980: Replace goto loop with do-while loop · cf7b71f4
    Lars-Peter Clausen authored
    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: default avatarLars-Peter Clausen <lars@metafoo.de>
    Signed-off-by: default avatarMark Brown <broonie@linaro.org>
    cf7b71f4
ad1980.c 8.7 KB