From patchwork Wed Feb 10 08:34:33 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Guzman Lugo, Fernando" X-Patchwork-Id: 78300 X-Patchwork-Delegate: omar.ramirez@ti.com Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.3/8.14.3) with ESMTP id o1A8X642014254 for ; Wed, 10 Feb 2010 08:34:40 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752778Ab0BJIej (ORCPT ); Wed, 10 Feb 2010 03:34:39 -0500 Received: from bear.ext.ti.com ([192.94.94.41]:56767 "EHLO bear.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752253Ab0BJIei convert rfc822-to-8bit (ORCPT ); Wed, 10 Feb 2010 03:34:38 -0500 Received: from dlep34.itg.ti.com ([157.170.170.115]) by bear.ext.ti.com (8.13.7/8.13.7) with ESMTP id o1A8YYNU021248 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 10 Feb 2010 02:34:34 -0600 Received: from dlep26.itg.ti.com (localhost [127.0.0.1]) by dlep34.itg.ti.com (8.13.7/8.13.7) with ESMTP id o1A8YYFt029662; Wed, 10 Feb 2010 02:34:34 -0600 (CST) Received: from dsbe71.ent.ti.com (localhost [127.0.0.1]) by dlep26.itg.ti.com (8.13.8/8.13.8) with ESMTP id o1A8YY2i019934; Wed, 10 Feb 2010 02:34:34 -0600 (CST) Received: from dlee06.ent.ti.com ([157.170.170.11]) by dsbe71.ent.ti.com ([156.117.232.23]) with mapi; Wed, 10 Feb 2010 02:34:34 -0600 From: "Guzman Lugo, Fernando" To: "linux-omap@vger.kernel.org" CC: Ameya Palande , Hiroshi Doyu , "felipe.contreras@nokia.com" Date: Wed, 10 Feb 2010 02:34:33 -0600 Subject: [PATCH] DSPBRIDGE: Avoid inserting wrong elements to STRM list Thread-Topic: [PATCH] DSPBRIDGE: Avoid inserting wrong elements to STRM list Thread-Index: AcqqK97XAKT2G02VS5Ote9jKy+uDAw== Message-ID: <496565EC904933469F292DDA3F1663E602AA725DC7@dlee06.ent.ti.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: acceptlanguage: en-US MIME-Version: 1.0 Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter.kernel.org [140.211.167.41]); Wed, 10 Feb 2010 08:34:40 +0000 (UTC) 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) &&