>From 09260a0211d088d840d09c04380c8c9448c01ec4 Mon Sep 17 00:00:00 2001 From: Fernando Guzman Lugo <x0095840@xxxxxx> Date: Wed, 10 Feb 2010 02:33:54 -0600 Subject: [PATCH] DSPBRIDGE: Avoid inserting wrong elements to STRM list This fixes a bug where in error case and after deleting a strm element (if allocated), the strm is still inserted as part of the process context allocated resources, this pointer is not valid and shouldn't be considered as part of valid resources. Signed-off-by: Fernando Guzman Lugo <x0095840@xxxxxx> --- drivers/dsp/bridge/rmgr/strm.c | 8 ++++---- 1 files changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/dsp/bridge/rmgr/strm.c b/drivers/dsp/bridge/rmgr/strm.c index 1bb4670..e004205 100644 --- a/drivers/dsp/bridge/rmgr/strm.c +++ b/drivers/dsp/bridge/rmgr/strm.c @@ -634,12 +634,12 @@ func_cont: status); } } - if (DSP_SUCCEEDED(status)) + if (DSP_SUCCEEDED(status)) { *phStrm = pStrm; - else + DRV_ProcInsertSTRMResElement(*phStrm, &hSTRMRes, pr_ctxt); + } else { (void)DeleteStrm(pStrm); - - DRV_ProcInsertSTRMResElement(*phStrm, &hSTRMRes, pr_ctxt); + } /* ensure we return a documented error code */ DBC_Ensure((DSP_SUCCEEDED(status) && -- 1.6.0.4 -- 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