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: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com> Reviewed-on: https://review.gerrithub.io/382927 Reviewed-by: Jim Harris <james.r.harris@intel.com> Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com> Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
This commit is contained in:
parent
23ec116cbb
commit
3070826140
@ -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];
|
||||
|
Loading…
Reference in New Issue
Block a user