[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] [PATCH] xen-fbfront: correct return value checks on xenbus_scanf()



Only a positive return value indicates success.

Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>
---
 drivers/video/fbdev/xen-fbfront.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

--- 4.7-rc6-xenbus_scanf.orig/drivers/video/fbdev/xen-fbfront.c
+++ 4.7-rc6-xenbus_scanf/drivers/video/fbdev/xen-fbfront.c
@@ -658,13 +658,13 @@ InitWait:
                        goto InitWait; /* no InitWait seen yet, fudge it */
 
                if (xenbus_scanf(XBT_NIL, info->xbdev->otherend,
-                                "request-update", "%d", &val) < 0)
+                                "request-update", "%d", &val) <= 0)
                        val = 0;
                if (val)
                        info->update_wanted = 1;
 
                if (xenbus_scanf(XBT_NIL, dev->otherend,
-                                "feature-resize", "%d", &val) < 0)
+                                "feature-resize", "%d", &val) <= 0)
                        val = 0;
                info->feature_resize = val;
                break;




_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
https://lists.xen.org/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.