Skip to content

Commit

Permalink
updated pool allocate API (#634)
Browse files Browse the repository at this point in the history
Co-authored-by: Alena Egorova <[email protected]>
  • Loading branch information
Alena Egorova and Alena Egorova authored Mar 25, 2022
1 parent ac79480 commit cc4d9c5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
3 changes: 1 addition & 2 deletions general/pcidrv/kmdf/HW/nic_init.c
Original file line number Diff line number Diff line change
Expand Up @@ -1045,7 +1045,7 @@ Return Value:
break;
}

pMem = ExAllocatePoolWithTag(NonPagedPool,
pMem = ExAllocatePool2(POOL_FLAG_NON_PAGED,
FdoData->MpTcbMemSize, PCIDRV_POOL_TAG);
if (NULL == pMem )
{
Expand All @@ -1054,7 +1054,6 @@ Return Value:
break;
}

RtlZeroMemory(pMem, FdoData->MpTcbMemSize);
FdoData->MpTcbMem = pMem;

// HW_START
Expand Down
4 changes: 1 addition & 3 deletions general/pcidrv/kmdf/HW/nic_pm.c
Original file line number Diff line number Diff line change
Expand Up @@ -1361,7 +1361,7 @@ Return Value:
break;
}

pWakeUpPattern = ExAllocatePoolWithTag(NonPagedPool, AllocationLength, PCIDRV_POOL_TAG);
pWakeUpPattern = ExAllocatePool2(POOL_FLAG_NON_PAGED, AllocationLength, PCIDRV_POOL_TAG);

if (!pWakeUpPattern)
{
Expand All @@ -1371,8 +1371,6 @@ Return Value:
//
// Initialize pWakeUpPattern
//
RtlZeroMemory (pWakeUpPattern, AllocationLength);

pWakeUpPattern->AllocationSize = AllocationLength;

pWakeUpPattern->Signature = Signature;
Expand Down

0 comments on commit cc4d9c5

Please sign in to comment.