vhost: remove needless if branch for bvdev/svdev

Change-Id: I362f748fa44fda8b574458cffa6f222d71e770b6
Signed-off-by: Xiaodong Liu <xiaodong.liu@intel.com>
Reviewed-on: https://review.gerrithub.io/388348
Reviewed-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
This commit is contained in:
Xiaodong Liu 2017-11-21 01:06:56 -05:00 committed by Jim Harris
parent b8705bf48c
commit 834a9bb7e8
2 changed files with 0 additions and 9 deletions

View File

@ -484,10 +484,6 @@ spdk_vhost_blk_start(struct spdk_vhost_dev *vdev, void *event_ctx)
SPDK_ERRLOG("Trying to start non-blk controller as a blk one.\n");
rc = -1;
goto out;
} else if (bvdev == NULL) {
SPDK_ERRLOG("Trying to start non-blk controller as blk one.\n");
rc = -1;
goto out;
}
rc = alloc_task_pool(bvdev);

View File

@ -798,11 +798,6 @@ spdk_vhost_scsi_dev_add_dev(struct spdk_vhost_dev *vdev, unsigned scsi_dev_num,
return -1;
}
svdev = to_scsi_dev(vdev);
if (svdev == NULL) {
return -EINVAL;
}
if (vdev->lcore != -1 && !spdk_vhost_dev_has_feature(vdev, VIRTIO_SCSI_F_HOTPLUG)) {
SPDK_ERRLOG("Controller %s is in use and hotplug is not supported\n", vdev->name);
return -ENOTSUP;