vhost/blk: fix error path of spdk_vhost_blk_start()

Change-Id: If0d5b409b508c59e1444b81f5862c1a7594c6b9d
Signed-off-by: wuzhouhui <wuzhouhui@kingsoft.com>
Reviewed-on: https://review.gerrithub.io/423203
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
This commit is contained in:
wuzhouhui 2018-08-23 15:12:46 +08:00 committed by Jim Harris
parent d5d199cfa7
commit 0309efde4c

View File

@ -528,6 +528,7 @@ spdk_vhost_blk_start(struct spdk_vhost_dev *vdev, void *event_ctx)
if (bvdev->bdev) {
bvdev->bdev_io_channel = spdk_bdev_get_io_channel(bvdev->bdev_desc);
if (!bvdev->bdev_io_channel) {
free_task_pool(bvdev);
SPDK_ERRLOG("Controller %s: IO channel allocation failed\n", vdev->name);
rc = -1;
goto out;