From: Roel Kluin <12o3l@tiscali.nl> If count reaches zero, the loop ends, but the postfix decrement still subtracts: testing for 'count == 0' will not work. Signed-off-by: Roel Kluin <12o3l@tiscali.nl> Reviewed-by: Ray Lee Acked-by: Muli Ben-Yehuda Signed-off-by: Andrew Morton --- sound/oss/trident.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff -puN sound/oss/trident.c~sound-oss-tridentc-fix-incorrect-test-in-trident_ac97_set sound/oss/trident.c --- a/sound/oss/trident.c~sound-oss-tridentc-fix-incorrect-test-in-trident_ac97_set +++ a/sound/oss/trident.c @@ -2935,7 +2935,7 @@ trident_ac97_set(struct ac97_codec *code do { if ((inw(TRID_REG(card, address)) & busy) == 0) break; - } while (count--); + } while (--count); data |= (mask | (reg & AC97_REG_ADDR)); @@ -2996,7 +2996,7 @@ trident_ac97_get(struct ac97_codec *code data = inl(TRID_REG(card, address)); if ((data & busy) == 0) break; - } while (count--); + } while (--count); spin_unlock_irqrestore(&card->lock, flags); if (count == 0) { _