[NDISUIO]

- Fix missing spin lock release
- Return the correct status for an invalid index

svn path=/branches/wlan-bringup/; revision=54822
This commit is contained in:
Cameron Gutman 2012-01-03 19:22:30 +00:00
parent 7360d0e1fb
commit 90d838bf1a

View file

@ -52,6 +52,7 @@ QueryBinding(PIRP Irp, PIO_STACK_LOCATION IrpSp)
i++; i++;
CurrentEntry = CurrentEntry->Flink; CurrentEntry = CurrentEntry->Flink;
} }
KeReleaseSpinLock(&GlobalAdapterListLock, OldIrql);
if (i == QueryBinding->BindingIndex) if (i == QueryBinding->BindingIndex)
{ {
AdapterContext = CONTAINING_RECORD(CurrentEntry, NDISUIO_ADAPTER_CONTEXT, ListEntry); AdapterContext = CONTAINING_RECORD(CurrentEntry, NDISUIO_ADAPTER_CONTEXT, ListEntry);
@ -78,7 +79,7 @@ QueryBinding(PIRP Irp, PIO_STACK_LOCATION IrpSp)
else else
{ {
/* Invalid index */ /* Invalid index */
Status = STATUS_INVALID_PARAMETER; Status = STATUS_NO_MORE_ENTRIES;
} }
} }
else else