diff options
author | Dan Carpenter <dan.carpenter@oracle.com> | 2018-05-31 02:25:07 -0400 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2018-05-31 03:11:03 -0400 |
commit | 0d5bcfc9974ad8ce0fc77a95a53ab704faa0dfb7 (patch) | |
tree | a725d490e20d6de26780076066a416286e6d25f3 | |
parent | e46dcbb17d790008a12b1c18f6235d03d1dd635b (diff) |
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 <dan.carpenter@oracle.com>
Reviewed-by: Oleksandr Andrushchenko <oleksandr_andrushchenko@epam.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
-rw-r--r-- | sound/xen/xen_snd_front.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sound/xen/xen_snd_front.c b/sound/xen/xen_snd_front.c index c18973a9bc9b..b089b13b5160 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) | |||
334 | */ | 334 | */ |
335 | while ((xenbus_read_unsigned(front_info->xb_dev->otherend, "state", | 335 | while ((xenbus_read_unsigned(front_info->xb_dev->otherend, "state", |
336 | XenbusStateUnknown) != XenbusStateInitWait) && | 336 | XenbusStateUnknown) != XenbusStateInitWait) && |
337 | to--) | 337 | --to) |
338 | msleep(10); | 338 | msleep(10); |
339 | 339 | ||
340 | if (!to) { | 340 | if (!to) { |