Commit 30708261 authored by Dariusz Stojaczyk's avatar Dariusz Stojaczyk Committed by Jim Harris
Browse files

bdev_virtio: explicitly return -1 on channel creation failure



This doesn't change any behavior
as queue_idx was always either
0 or -1, but makes it clear that
this function always returns
-1 on error. This is required
by current io_channel implementation.

Change-Id: I2b613ab9ff1e48d5b4aee0cd499bbc0a04cb765c
Signed-off-by: default avatarDariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/382927


Reviewed-by: default avatarJim Harris <james.r.harris@intel.com>
Reviewed-by: default avatarDaniel Verkamp <daniel.verkamp@intel.com>
Tested-by: default avatarSPDK Automated Test System <sys_sgsw@intel.com>
parent 23ec116c
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -445,7 +445,7 @@ bdev_virtio_create_cb(void *io_device, void *ctx_buf)
	queue_idx = virtio_dev_find_and_acquire_queue(vdev, VIRTIO_SCSI_REQUESTQ);
	if (queue_idx < 0) {
		SPDK_ERRLOG("Couldn't get an unused queue for the io_channel.\n");
		return queue_idx;
		return -1;
	}

	vq = vdev->vqs[queue_idx];