Commit 0d5bcfc9 authored by Dan Carpenter's avatar Dan Carpenter Committed by Takashi Iwai

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: cc3196ae ("ALSA: xen-front: Introduce Xen para-virtualized sound frontend driver")
Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: default avatarOleksandr Andrushchenko <oleksandr_andrushchenko@epam.com>
Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
parent e46dcbb1
...@@ -334,7 +334,7 @@ static int xen_drv_remove(struct xenbus_device *dev) ...@@ -334,7 +334,7 @@ static int xen_drv_remove(struct xenbus_device *dev)
*/ */
while ((xenbus_read_unsigned(front_info->xb_dev->otherend, "state", while ((xenbus_read_unsigned(front_info->xb_dev->otherend, "state",
XenbusStateUnknown) != XenbusStateInitWait) && XenbusStateUnknown) != XenbusStateInitWait) &&
to--) --to)
msleep(10); msleep(10);
if (!to) { if (!to) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment