From: Dan Carpenter Date: Thu, 31 May 2018 06:25:07 +0000 (+0300) Subject: ALSA: xen-front: fix a loop timeout X-Git-Tag: v4.19~773^2~17^2~3 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=0d5bcfc9974ad8ce0fc77a95a53ab704faa0dfb7;p=platform%2Fkernel%2Flinux-rpi.git ALSA: xen-front: fix a loop timeout We want the loop to exit when "to" is set to zero, but in the current code it's set to -1. Also I tweaked the indenting so it doesn't look like we're passing "--to" to xenbus_read_unsigned(). Fixes: cc3196ae197c ("ALSA: xen-front: Introduce Xen para-virtualized sound frontend driver") Signed-off-by: Dan Carpenter Reviewed-by: Oleksandr Andrushchenko Signed-off-by: Takashi Iwai --- diff --git a/sound/xen/xen_snd_front.c b/sound/xen/xen_snd_front.c index c18973a..b089b13 100644 --- a/sound/xen/xen_snd_front.c +++ b/sound/xen/xen_snd_front.c @@ -334,7 +334,7 @@ static int xen_drv_remove(struct xenbus_device *dev) */ while ((xenbus_read_unsigned(front_info->xb_dev->otherend, "state", XenbusStateUnknown) != XenbusStateInitWait) && - to--) + --to) msleep(10); if (!to) {