Signed-off-by: Ameya Palande <ameya.palande@xxxxxxxxx> --- drivers/dsp/bridge/rmgr/drv_interface.c | 8 +++----- 1 files changed, 3 insertions(+), 5 deletions(-) diff --git a/drivers/dsp/bridge/rmgr/drv_interface.c b/drivers/dsp/bridge/rmgr/drv_interface.c index d9504cc..350e1b5 100755 --- a/drivers/dsp/bridge/rmgr/drv_interface.c +++ b/drivers/dsp/bridge/rmgr/drv_interface.c @@ -585,7 +585,7 @@ static int bridge_open(struct inode *ip, struct file *filp) DSP_STATUS dsp_status = DSP_SOK; HANDLE hDrvObject = NULL; struct PROCESS_CONTEXT *pPctxt = NULL; - struct PROCESS_CONTEXT *pTmp = NULL; + struct PROCESS_CONTEXT *next_node = NULL; struct PROCESS_CONTEXT *pCtxtclosed = NULL; struct PROCESS_CONTEXT *pCtxttraverse = NULL; struct task_struct *tsk = NULL; @@ -600,6 +600,7 @@ static int bridge_open(struct inode *ip, struct file *filp) DRV_GetProcCtxtList(&pCtxtclosed, (struct DRV_OBJECT *)hDrvObject); while (pCtxtclosed != NULL) { tsk = find_task_by_vpid(pCtxtclosed->pid); + next_node = pCtxtclosed->next; if ((tsk == NULL) || (tsk->exit_state == EXIT_ZOMBIE)) { @@ -637,14 +638,11 @@ static int bridge_open(struct inode *ip, struct file *filp) } } } - pTmp = pCtxtclosed->next; DRV_RemoveProcContext((struct DRV_OBJECT *)hDrvObject, pCtxtclosed, (void *)pCtxtclosed->pid); - } else { - pTmp = pCtxtclosed->next; } - pCtxtclosed = pTmp; + pCtxtclosed = next_node; } func_cont: dsp_status = CFG_GetObject((u32 *)&hDrvObject, REG_DRV_OBJECT); -- 1.6.2.1 -- To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html