Commit f45140df authored by Dan Carpenter's avatar Dan Carpenter Committed by Oleksandr Andrushchenko

drm/xen-front: Fix loop timeout

If the loop times out then we want to exit with "to" set to zero, but in
the current code it's set to -1.

Fixes: c575b7ee ("drm/xen-front: Add support for Xen PV display frontend")
Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: default avatarOleksandr Andrushchenko <oleksandr_andrushchenko@epam.com>
Signed-off-by: default avatarOleksandr Andrushchenko <oleksandr_andrushchenko@epam.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20180508092829.GC661@mwanda
parent 18f20bc5
...@@ -778,7 +778,7 @@ static int xen_drv_remove(struct xenbus_device *dev) ...@@ -778,7 +778,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