1
0
Fork 0

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: cc3196ae19 ("ALSA: xen-front: Introduce Xen para-virtualized sound frontend driver")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: Oleksandr Andrushchenko <oleksandr_andrushchenko@epam.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
hifive-unleashed-5.1
Dan Carpenter 2018-05-31 09:25:07 +03:00 committed by Takashi Iwai
parent e46dcbb17d
commit 0d5bcfc997
1 changed files with 1 additions and 1 deletions

View File

@ -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) {