From: Fernando Guzman Lugo <[email protected]>

This patch removes a wrong pointer and set to NULL dwSysCtrlBase
as it shouldn't be used anymore after iounmap.

Signed-off-by: Fernando Guzman Lugo <[email protected]>
---
 drivers/dsp/bridge/rmgr/drv.c |    7 +++----
 1 files changed, 3 insertions(+), 4 deletions(-)

diff --git a/drivers/dsp/bridge/rmgr/drv.c b/drivers/dsp/bridge/rmgr/drv.c
index 56ceb6c..9b07f25 100644
--- a/drivers/dsp/bridge/rmgr/drv.c
+++ b/drivers/dsp/bridge/rmgr/drv.c
@@ -1138,11 +1138,9 @@ static DSP_STATUS RequestBridgeResources(u32 dwContext, 
s32 bRequest)
                                iounmap((void *)pResources->dwPerPmBase);
                        if (pResources->dwCorePmBase)
                                iounmap((void *)pResources->dwCorePmBase);
-                       if (pResources->dwSysCtrlBase) {
+                       if (pResources->dwSysCtrlBase)
                                iounmap(pResources->dwSysCtrlBase);
-                               /* don't set pResources->dwSysCtrlBase to null
-                                * as it is used in BOARD_Stop */
-                       }
+
                        pResources->dwPrmBase = NULL;
                        pResources->dwCmBase = NULL;
                        pResources->dwMboxBase = NULL;
@@ -1152,6 +1150,7 @@ static DSP_STATUS RequestBridgeResources(u32 dwContext, 
s32 bRequest)
                        pResources->dwMemBase[4] = (u32) NULL;
                        pResources->dwWdTimerDspBase = NULL;
                        pResources->dwDmmuBase = NULL;
+                       pResources->dwSysCtrlBase = NULL;
 
                        dwBuffSize = sizeof(struct CFG_HOSTRES);
                        status = REG_SetValue(CURRENTCONFIG, (u8 *)pResources,
-- 
1.6.2.4

--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to