MdeModulePkg/UfsPassThruDxe: Fix typo in UfsPassThruGetTargetLun()

For function UfsPassThruGetTargetLun(), the length of the input device
node specified by 'DevicePath' should be compared with the size of
'UFS_DEVICE_PATH' rather than the size of 'SCSI_DEVICE_PATH'.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Hao Wu <hao.a.wu@intel.com>
Reviewed-by: Star Zeng <star.zeng@intel.com>
This commit is contained in:
Hao Wu 2017-05-16 13:24:29 +08:00
parent 7607599627
commit a8321feebb
1 changed files with 2 additions and 2 deletions

View File

@ -479,10 +479,10 @@ UfsPassThruGetTargetLun (
}
//
// Check whether the DevicePath belongs to SCSI_DEVICE_PATH
// Check whether the DevicePath belongs to UFS_DEVICE_PATH
//
if ((DevicePath->Type != MESSAGING_DEVICE_PATH) || (DevicePath->SubType != MSG_UFS_DP) ||
(DevicePathNodeLength(DevicePath) != sizeof(SCSI_DEVICE_PATH))) {
(DevicePathNodeLength(DevicePath) != sizeof(UFS_DEVICE_PATH))) {
return EFI_UNSUPPORTED;
}