if (virtualDev == NULL || *virtualDev != NULL) {
ESX_ERROR(conn, VIR_ERR_INTERNAL_ERROR, "Invalid argument");
- goto failure;
+ return -1;
}
if (controller < 0 || controller > 3) {
ESX_ERROR(conn, VIR_ERR_INTERNAL_ERROR,
"SCSI controller index %d out of [0..3] range",
controller);
- goto failure;
+ return -1;
}
snprintf(present_name, sizeof(present_name), "scsi%d.present", controller);
ESX_ERROR(conn, VIR_ERR_INTERNAL_ERROR,
"Ethernet controller index %d out of [0..3] range",
controller);
- goto failure;
+ return -1;
}
if (VIR_ALLOC(*def) < 0) {
if (port < 0 || port > 3) {
ESX_ERROR(conn, VIR_ERR_INTERNAL_ERROR,
"Serial port index %d out of [0..3] range", port);
- goto failure;
+ return -1;
}
if (VIR_ALLOC(*def) < 0) {
if (port < 0 || port > 2) {
ESX_ERROR(conn, VIR_ERR_INTERNAL_ERROR,
"Parallel port index %d out of [0..2] range", port);
- goto failure;
+ return -1;
}
if (VIR_ALLOC(*def) < 0) {