MdeModulePkg SataControllerDxe: Use compare logic in if condition

Use compare logic in if condition to fix ECC issue.
It is caused by aa4240edff.

Cc: Hao Wu <hao.a.wu@intel.com>
Cc: Dandan Bi <dandan.bi@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Star Zeng <star.zeng@intel.com>
Reviewed-by: Dandan Bi <dandan.bi@intel.com>
Reviewed-by: Hao Wu <hao.a.wu@intel.com>
This commit is contained in:
Star Zeng 2018-07-02 17:07:54 +08:00
parent 5f46352300
commit cd69c87383
1 changed files with 1 additions and 1 deletions

View File

@ -483,7 +483,7 @@ SataControllerStart (
} }
MaxPortNumber = 31; MaxPortNumber = 31;
while (MaxPortNumber > 0) { while (MaxPortNumber > 0) {
if (Data32 & (1 << MaxPortNumber)) { if ((Data32 & ((UINT32)1 << MaxPortNumber)) != 0) {
break; break;
} }
MaxPortNumber--; MaxPortNumber--;