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

[Xen-devel] [PATCH 1/2] libxl: Set rc on failure of usbdev_busaddr_to_busid



We must set rc before using `goto out'.

Bug introduced in bf7628f0 "libxl: add pvusb API".

CID: 1358113
Signed-off-by: Ian Jackson <Ian.Jackson@xxxxxxxxxxxxx>
CC: coverity@xxxxxxxxxxxxxx
CC: Simon Cao <caobosimon@xxxxxxxxx>
CC: George Dunlap <george.dunlap@xxxxxxxxxx>
CC: Chunyan Liu <cyliu@xxxxxxxx>
---
 tools/libxl/libxl_pvusb.c |    1 +
 1 file changed, 1 insertion(+)

diff --git a/tools/libxl/libxl_pvusb.c b/tools/libxl/libxl_pvusb.c
index 5f92628..6f53317 100644
--- a/tools/libxl/libxl_pvusb.c
+++ b/tools/libxl/libxl_pvusb.c
@@ -905,6 +905,7 @@ static int libxl__device_usbdev_add_xenstore(libxl__gc *gc, 
uint32_t domid,
                                     usbdev->u.hostdev.hostaddr);
     if (!busid) {
         LOG(DEBUG, "Fail to get busid of usb device");
+        rc = ERROR_FAIL;
         goto out;
     }
 
-- 
1.7.10.4


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

 


Rackspace

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