Compare commits

...

2 Commits

Author SHA1 Message Date
Johannes Anderwald
7bc6fc0647 [MMIXER]
- Merge 50674

svn path=/branches/audio-bringup/; revision=51456
2011-04-25 20:38:39 +00:00
Johannes Anderwald
eb95f0258e - Fix a bug where a spinlock was acquired on not initialized local variable
svn path=/branches/audio-bringup/; revision=50672
2011-02-12 18:54:43 +00:00
2 changed files with 12 additions and 4 deletions

View File

@@ -1156,12 +1156,12 @@ KspBusWorkerRoutine(
BOOLEAN DoInvalidate = FALSE;
KIRQL OldLevel;
/* acquire lock */
KeAcquireSpinLock(&BusDeviceExtension->Lock, &OldLevel);
/* get device extension */
BusDeviceExtension = (PBUS_ENUM_DEVICE_EXTENSION)Parameter;
/* acquire lock */
KeAcquireSpinLock(&BusDeviceExtension->Lock, &OldLevel);
/* get current time */
KeQuerySystemTime(&Time);

View File

@@ -544,6 +544,14 @@ MMixerSetGetMuxControlDetails(
ASSERT(MixerData->Topology);
ASSERT(MixerData->MixerInfo == MixerInfo);
/* now allocate logical pin array */
Status = MMixerAllocateTopologyNodeArray(MixerContext, MixerData->Topology, &LogicalNodes);
if (Status != MM_STATUS_SUCCESS)
{
/* no memory */
return MM_STATUS_NO_MEMORY;
}
/* get logical pin nodes */
MMixerGetConnectedFromLogicalTopologyPins(MixerData->Topology, MixerControl->NodeID, &LogicalNodesCount, LogicalNodes);
@@ -552,7 +560,7 @@ MMixerSetGetMuxControlDetails(
ASSERT(LogicalNodesCount == MixerControl->Control.Metrics.dwReserved[0]);
Values = (LPMIXERCONTROLDETAILS_BOOLEAN)MixerControlDetails->paDetails;
for(Index = 0; Index < ConnectedNodesCount; Index++)
for(Index = 0; Index < LogicalNodesCount; Index++)
{
/* getting logical pin offset */
MMixerGetLowestLogicalTopologyPinOffsetFromArray(LogicalNodesCount, LogicalNodes, &CurLogicalPinOffset);