diff options
Diffstat (limited to 'MdeModulePkg')
-rw-r--r-- | MdeModulePkg/Bus/Pci/UhciDxe/UhciSched.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/MdeModulePkg/Bus/Pci/UhciDxe/UhciSched.c b/MdeModulePkg/Bus/Pci/UhciDxe/UhciSched.c index c08f949..408e7d5 100644 --- a/MdeModulePkg/Bus/Pci/UhciDxe/UhciSched.c +++ b/MdeModulePkg/Bus/Pci/UhciDxe/UhciSched.c @@ -197,7 +197,7 @@ UhciDestoryFrameList ( }
/**
- Convert the poll rate to the maxium 2^n that is smaller
+ Convert the poll rate to the maximum 2^n that is smaller
than Interval.
@param Interval The poll rate to convert.
@@ -215,6 +215,14 @@ UhciConvertPollRate ( ASSERT (Interval != 0);
//
+ // To safeguard RELEASE mode wherein ASSERT is effectively not there,
+ // if inadvertently Interval is still 0 here, treat it the same as 1.
+ //
+ if (Interval == 0) {
+ Interval = 1;
+ }
+
+ //
// Find the index (1 based) of the highest non-zero bit
//
BitCount = 0;
|