* [PATCH] DSPBRIDGE: Fix error handling in NODE_GetUUIDProps
@ 2009-03-23 13:15 Ameya Palande
2009-03-23 14:38 ` Seth Forshee
0 siblings, 1 reply; 3+ messages in thread
From: Ameya Palande @ 2009-03-23 13:15 UTC (permalink / raw)
To: linux-omap; +Cc: Seth Forshee
From: Seth Forshee <seth.forshee@gmail.com>
The error handling is ineffective and can lead to an oops.
Acked-by: Ameya Palande <ameya.palande@nokia.com>
Signed-off-by: Seth Forshee <seth.forshee@gmail.com>
---
drivers/dsp/bridge/rmgr/node.c | 26 ++++++++++++++++----------
1 files changed, 16 insertions(+), 10 deletions(-)
diff --git a/drivers/dsp/bridge/rmgr/node.c b/drivers/dsp/bridge/rmgr/node.c
index 357d1cf..243e14b 100644
--- a/drivers/dsp/bridge/rmgr/node.c
+++ b/drivers/dsp/bridge/rmgr/node.c
@@ -3285,16 +3285,23 @@ DSP_STATUS NODE_GetUUIDProps(DSP_HPROCESSOR hProcessor,
pNodeId, pNodeProps);
status = PROC_GetDevObject(hProcessor, &hDevObject);
- if (DSP_SUCCEEDED(status)) {
- status = DEV_GetNodeManager(hDevObject, &hNodeMgr);
- if (hNodeMgr == NULL)
- status = DSP_EFAIL;
+ if (DSP_FAILED(status))
+ goto func_end;
+
+ status = DEV_GetNodeManager(hDevObject, &hNodeMgr);
+ if (DSP_FAILED(status))
+ goto func_end;
+ if (hNodeMgr == NULL) {
+ status = DSP_EFAIL;
+ goto func_end;
}
- /* Enter the critical section. This is needed because
- * DCD_GetObjectDef will ultimately end up calling DBLL_open/close,
- * which needs to be protected in order to not corrupt the zlib manager
- * (COD). */
+ /*
+ * Enter the critical section. This is needed because
+ * DCD_GetObjectDef will ultimately end up calling DBLL_open/close,
+ * which needs to be protected in order to not corrupt the zlib manager
+ * (COD).
+ */
status = SYNC_EnterCS(hNodeMgr->hSync);
if (DSP_SUCCEEDED(status)) {
@@ -3323,9 +3330,8 @@ DSP_STATUS NODE_GetUUIDProps(DSP_HPROCESSOR hProcessor,
}
/* Leave the critical section, we're done. */
(void)SYNC_LeaveCS(hNodeMgr->hSync);
-
}
-
+func_end:
return status;
}
--
1.5.6.3
^ permalink raw reply related [flat|nested] 3+ messages in thread* Re: [PATCH] DSPBRIDGE: Fix error handling in NODE_GetUUIDProps
2009-03-23 13:15 [PATCH] DSPBRIDGE: Fix error handling in NODE_GetUUIDProps Ameya Palande
@ 2009-03-23 14:38 ` Seth Forshee
2009-03-23 14:53 ` Seth Forshee
0 siblings, 1 reply; 3+ messages in thread
From: Seth Forshee @ 2009-03-23 14:38 UTC (permalink / raw)
To: Ameya Palande; +Cc: linux-omap
On Mon, Mar 23, 2009 at 03:15:07PM +0200, Ameya Palande wrote:
> From: Seth Forshee <seth.forshee@gmail.com>
>
> The error handling is ineffective and can lead to an oops.
>
> Acked-by: Ameya Palande <ameya.palande@nokia.com>
> Signed-off-by: Seth Forshee <seth.forshee@gmail.com>
Ah, hadn't seen this one yet when I sent my previous reply. Thanks.
Seth
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] DSPBRIDGE: Fix error handling in NODE_GetUUIDProps
2009-03-23 14:38 ` Seth Forshee
@ 2009-03-23 14:53 ` Seth Forshee
0 siblings, 0 replies; 3+ messages in thread
From: Seth Forshee @ 2009-03-23 14:53 UTC (permalink / raw)
To: Ameya Palande, linux-omap
On Mon, Mar 23, 2009 at 09:38:47AM -0500, Seth Forshee wrote:
> On Mon, Mar 23, 2009 at 03:15:07PM +0200, Ameya Palande wrote:
> > From: Seth Forshee <seth.forshee@gmail.com>
> >
> > The error handling is ineffective and can lead to an oops.
> >
> > Acked-by: Ameya Palande <ameya.palande@nokia.com>
> > Signed-off-by: Seth Forshee <seth.forshee@gmail.com>
>
> Ah, hadn't seen this one yet when I sent my previous reply. Thanks.
Whoops, there was a discussion on this topic on the omap-android list,
and I didn't notice that this patch was posted to the linux-omap list
instead of that one. Sorry for the noise.
Cheers,
Seth
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2009-03-23 14:54 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-03-23 13:15 [PATCH] DSPBRIDGE: Fix error handling in NODE_GetUUIDProps Ameya Palande
2009-03-23 14:38 ` Seth Forshee
2009-03-23 14:53 ` Seth Forshee
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox