We must set rc before using `goto out'.

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

CID: 1358113
Signed-off-by: Ian Jackson <[email protected]>
CC: [email protected]
CC: Simon Cao <[email protected]>
CC: George Dunlap <[email protected]>
CC: Chunyan Liu <[email protected]>
---
 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
[email protected]
http://lists.xen.org/xen-devel

Reply via email to