diff mbox

[v3] DSPBRIDGE: Fix to avoid possible recursive locking

Message ID DDE834F1D8D96540B7373DFF675BF56C1B8A2B5AAD@NOK-EUMSG-03.mgdnok.nokia.com (mailing list archive)
State Not Applicable
Delegated to:
Headers show

Commit Message

Ameya Palande Feb. 11, 2010, 7:41 p.m. UTC
None
diff mbox

Patch

diff --git a/drivers/dsp/bridge/wmd/msg_sm.c b/drivers/dsp/bridge/wmd/msg_sm.c
index 7de3705..7414113 100644
--- a/drivers/dsp/bridge/wmd/msg_sm.c
+++ b/drivers/dsp/bridge/wmd/msg_sm.c
@@ -295,9 +295,8 @@  DSP_STATUS WMD_MSG_Get(struct MSG_QUEUE *hMsgQueue,
                                   (struct list_head *)pMsgFrame);
                        if (LST_IsEmpty(hMsgQueue->msgUsedList))
                                SYNC_ResetEvent(hMsgQueue->hSyncEvent);
-                       else {
+                       else
                                SYNC_SetEvent(hMsgQueue->hSyncEvent);
-                       }

                        fGotMsg = true;
                }
@@ -345,9 +344,9 @@  DSP_STATUS WMD_MSG_Get(struct MSG_QUEUE *hMsgQueue,
                        }
                        hMsgQueue->refCount--;
                        /* Reset the event if there are still queued messages */
-                       if (!LST_IsEmpty(hMsgQueue->msgUsedList)) {
+                       if (!LST_IsEmpty(hMsgQueue->msgUsedList))
                                SYNC_SetEvent(hMsgQueue->hSyncEvent);
-                       }
+
                        /* Exit critical section */
                        (void)SYNC_LeaveCS(hMsgMgr->hSyncCS);
                }