vhost/rpc: remove unnecessary if in the add_vhost_scsi_lun RPC
We explicitly checked for one of the strings in the parsed RPC request even though it's required for the entire request to parse successfully. The extra check is now removed. Change-Id: I19c446786e4ac88b88f14e18dc5258f31b1a87f1 Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com> Reviewed-on: https://review.gerrithub.io/c/443317 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Pawel Wodkowski <pawelx.wodkowski@intel.com> Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com> Reviewed-by: Jim Harris <james.r.harris@intel.com>
This commit is contained in:
parent
244a619fa9
commit
1dc9e7024b
@ -137,12 +137,6 @@ spdk_rpc_add_vhost_scsi_lun(struct spdk_jsonrpc_request *request,
|
|||||||
goto invalid;
|
goto invalid;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (req.ctrlr == NULL) {
|
|
||||||
SPDK_ERRLOG("No controller name\n");
|
|
||||||
rc = -EINVAL;
|
|
||||||
goto invalid;
|
|
||||||
}
|
|
||||||
|
|
||||||
spdk_vhost_lock();
|
spdk_vhost_lock();
|
||||||
vdev = spdk_vhost_dev_find(req.ctrlr);
|
vdev = spdk_vhost_dev_find(req.ctrlr);
|
||||||
if (vdev == NULL) {
|
if (vdev == NULL) {
|
||||||
|
Loading…
Reference in New Issue
Block a user