[PATCHv2 15/18] DSPBRIDGE: check the status of DMM_GetHandle

Omar Ramirez Luna
2009-12-17T02:08:49Z

Check the status of DMM_GetHandle

Signed-off-by: Omar Ramirez Luna <omar.ramirez@ti.com>
---
drivers/dsp/bridge/rmgr/proc.c | 17 ++++++++++-------
1 files changed, 10 insertions(+), 7 deletions(-)

diff --git a/drivers/dsp/bridge/rmgr/proc.c b/drivers/dsp/bridge/rmgr/proc.c
index 3c23d85..1ab6181 100644
--- a/drivers/dsp/bridge/rmgr/proc.c
+++ b/drivers/dsp/bridge/rmgr/proc.c
@@ -1833,16 +1833,19 @@ DSP_STATUS PROC_UnMap(DSP_HPROCESSOR hProcessor, void *pMapAddr)
}

status = DMM_GetHandle(hProcessor, &hDmmMgr);
- /* Critical section */
- (void)SYNC_EnterCS(hProcLock);
if (DSP_FAILED(status)) {
GT_1trace(PROC_DebugMask, GT_7CLASS, "PROC_UnMap: "
- "Failed to get DMM Mgr handle: 0x%x\n", status);
- } else {
- /* Update DMM structures. Get the size to unmap.
- This function returns error if the VA is not mapped */
- status = DMM_UnMapMemory(hDmmMgr, (u32) vaAlign, &sizeAlign);
+ "Failed to get DMM Mgr handle: 0x%x\n", status);
+ goto func_end;
}
+
+ /* Critical section */
+ (void)SYNC_EnterCS(hProcLock);
+ /*
+ * Update DMM structures. Get the size to unmap.
+ * This function returns error if the VA is not mapped
+ */
+ status = DMM_UnMapMemory(hDmmMgr, (u32) vaAlign, &sizeAlign);
/* Remove mapping from the page tables. */
if (DSP_SUCCEEDED(status)) {
status = (*pProcObject->pIntfFxns->pfnBrdMemUnMap)
--
1.6.2.4