Skip to content

Commit

Permalink
ALSA: xen-front: fix a loop timeout
Browse files Browse the repository at this point in the history
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: cc3196a ("ALSA: xen-front: Introduce Xen para-virtualized sound frontend driver")
Signed-off-by: Dan Carpenter <[email protected]>
Reviewed-by: Oleksandr Andrushchenko <[email protected]>
Signed-off-by: Takashi Iwai <[email protected]>
  • Loading branch information
Dan Carpenter authored and tiwai committed May 31, 2018
1 parent e46dcbb commit 0d5bcfc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sound/xen/xen_snd_front.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 0d5bcfc

Please sign in to comment.