diff --git a/MdeModulePkg/Bus/Pci/SataControllerDxe/SataController.c b/MdeModulePkg/Bus/Pci/SataControllerDxe/SataController.c index d47e918f57..86233bb86d 100644 --- a/MdeModulePkg/Bus/Pci/SataControllerDxe/SataController.c +++ b/MdeModulePkg/Bus/Pci/SataControllerDxe/SataController.c @@ -483,7 +483,7 @@ SataControllerStart ( } MaxPortNumber = 31; while (MaxPortNumber > 0) { - if (Data32 & (1 << MaxPortNumber)) { + if ((Data32 & ((UINT32)1 << MaxPortNumber)) != 0) { break; } MaxPortNumber--;