diff mbox

DSPBRIDGE: check pointer before calling Proc_Detach

Message ID 1265318253-20308-1-git-send-email-omar.ramirez@ti.com (mailing list archive)
State Not Applicable
Delegated to:
Headers show

Commit Message

omar ramirez Feb. 4, 2010, 9:17 p.m. UTC
None
diff mbox

Patch

diff --git a/drivers/dsp/bridge/rmgr/drv_interface.c b/drivers/dsp/bridge/rmgr/drv_interface.c
index 32aff66..b0f0d93 100644
--- a/drivers/dsp/bridge/rmgr/drv_interface.c
+++ b/drivers/dsp/bridge/rmgr/drv_interface.c
@@ -539,7 +539,8 @@  static int bridge_release(struct inode *ip, struct file *filp)
 	pr_ctxt = filp->private_data;
 	flush_signals(current);
 	DRV_RemoveAllResources(pr_ctxt);
-	PROC_Detach(pr_ctxt);
+	if (pr_ctxt->hProcessor)
+		PROC_Detach(pr_ctxt);
 	MEM_Free(pr_ctxt);
 
 	filp->private_data = NULL;