All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 3/3] drm/xen-front: Fix loop timeout
@ 2018-05-08  9:28 ` Dan Carpenter
  0 siblings, 0 replies; 9+ messages in thread
From: Dan Carpenter @ 2018-05-08  9:28 UTC (permalink / raw)
  To: Oleksandr Andrushchenko
  Cc: David Airlie, kernel-janitors, dri-devel, xen-devel

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: c575b7eeb89f ("drm/xen-front: Add support for Xen PV display frontend")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

diff --git a/drivers/gpu/drm/xen/xen_drm_front.c b/drivers/gpu/drm/xen/xen_drm_front.c
index 378cb7ce0db5..3345ac71b391 100644
--- a/drivers/gpu/drm/xen/xen_drm_front.c
+++ b/drivers/gpu/drm/xen/xen_drm_front.c
@@ -778,7 +778,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) {

^ permalink raw reply related	[flat|nested] 9+ messages in thread
* [PATCH 3/3] drm/xen-front: Fix loop timeout
@ 2018-05-08  9:28 Dan Carpenter
  0 siblings, 0 replies; 9+ messages in thread
From: Dan Carpenter @ 2018-05-08  9:28 UTC (permalink / raw)
  To: Oleksandr Andrushchenko
  Cc: David Airlie, kernel-janitors, dri-devel, xen-devel

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: c575b7eeb89f ("drm/xen-front: Add support for Xen PV display frontend")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

diff --git a/drivers/gpu/drm/xen/xen_drm_front.c b/drivers/gpu/drm/xen/xen_drm_front.c
index 378cb7ce0db5..3345ac71b391 100644
--- a/drivers/gpu/drm/xen/xen_drm_front.c
+++ b/drivers/gpu/drm/xen/xen_drm_front.c
@@ -778,7 +778,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) {

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

^ permalink raw reply related	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2018-05-08 11:49 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-05-08  9:28 [PATCH 3/3] drm/xen-front: Fix loop timeout Dan Carpenter
2018-05-08  9:28 ` Dan Carpenter
2018-05-08  9:37 ` Oleksandr Andrushchenko
2018-05-08  9:37   ` Oleksandr Andrushchenko
2018-05-08 11:49   ` Oleksandr Andrushchenko
2018-05-08 11:49     ` Oleksandr Andrushchenko
2018-05-08 11:49   ` Oleksandr Andrushchenko
2018-05-08  9:37 ` Oleksandr Andrushchenko
  -- strict thread matches above, loose matches on Subject: below --
2018-05-08  9:28 Dan Carpenter

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.