vhost: removed redundant check in get_scsi_lun()
Each call to get_scsi_lun is preceeded with the same check. Change-Id: I4597674f0024e923908d85bbfbd5404c500fddb1 Signed-off-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com> Reviewed-on: https://review.gerrithub.io/363172 Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com> Tested-by: SPDK Automated Test System <sys_sgsw@intel.com> Reviewed-by: Pawel Wodkowski <pawelx.wodkowski@intel.com> Reviewed-by: Ben Walker <benjamin.walker@intel.com>
This commit is contained in:
parent
9548caa608
commit
7d42767817
@ -227,11 +227,7 @@ get_scsi_lun(struct spdk_scsi_dev *scsi_dev, const __u8 *lun)
|
|||||||
uint16_t lun_id = (((uint16_t)lun[2] << 8) | lun[3]) & 0x3FFF;
|
uint16_t lun_id = (((uint16_t)lun[2] << 8) | lun[3]) & 0x3FFF;
|
||||||
|
|
||||||
/* For now only one LUN per controller is allowed so no need to search LUN IDs */
|
/* For now only one LUN per controller is allowed so no need to search LUN IDs */
|
||||||
if (likely(scsi_dev != NULL)) {
|
return spdk_scsi_dev_get_lun(scsi_dev, lun_id);
|
||||||
return spdk_scsi_dev_get_lun(scsi_dev, lun_id);
|
|
||||||
}
|
|
||||||
|
|
||||||
return NULL;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
Loading…
Reference in New Issue
Block a user