I’m building a USB driver for XP and up using WDF 6000. In the read
completion routine I make the calls shown below and prefast is producing the
warning
28167 - This function changes the IRQL and does not restore the
IRQL before it exits. It should be annotated to reflect the change or the
IRQL should be restored.
The WDF 6000 documentation says WdfSpinLockRelease(…) should return the
IRQL back to what it was prior to the WdfSpinLockAcquire(…) call so I’m
wondering if this is a Prefast bug.
WdfSpinLockAcquire(pDC->m_hASRSpinLock);
nASRPacketCnt = WdfCollectionGetCount(pDC->m_hASRCollection);
WdfSpinLockRelease(pDC->m_hASRSpinLock);