From: Andy Shevchenko <ext-andriy.shevchenko@xxxxxxxxx> Before this check zlLib already dereferenced on one hand and DBC_Require() checks for NULL on other hand. Signed-off-by: Andy Shevchenko <ext-andriy.shevchenko@xxxxxxxxx> --- drivers/dsp/bridge/pmgr/dbll.c | 34 ++++++++++++++++------------------ 1 files changed, 16 insertions(+), 18 deletions(-) diff --git a/drivers/dsp/bridge/pmgr/dbll.c b/drivers/dsp/bridge/pmgr/dbll.c index 7c3cd40..e655f89 100644 --- a/drivers/dsp/bridge/pmgr/dbll.c +++ b/drivers/dsp/bridge/pmgr/dbll.c @@ -909,26 +909,24 @@ void DBLL_unload(struct DBLL_LibraryObj *lib, struct DBLL_Attrs *attrs) goto func_end; zlLib->pTarget->attrs = *attrs; - if (zlLib != NULL) { - if (zlLib->mHandle) { - err = Dynamic_Unload_Module(zlLib->mHandle, - &zlLib->symbol.dlSymbol, - &zlLib->allocate.dlAlloc, &zlLib->init.dlInit); - if (err != 0) { - GT_1trace(DBLL_debugMask, GT_5CLASS, - "Dynamic_Unload_Module " - "failed: 0x%x\n", err); - } - } - /* remove symbols from symbol table */ - if (zlLib->symTab != NULL) { - GH_delete(zlLib->symTab); - zlLib->symTab = NULL; + if (zlLib->mHandle) { + err = Dynamic_Unload_Module(zlLib->mHandle, + &zlLib->symbol.dlSymbol, + &zlLib->allocate.dlAlloc, &zlLib->init.dlInit); + if (err != 0) { + GT_1trace(DBLL_debugMask, GT_5CLASS, + "Dynamic_Unload_Module " + "failed: 0x%x\n", err); } - /* delete DOFF desc since it holds *lots* of host OS - * resources */ - dofClose(zlLib); } + /* remove symbols from symbol table */ + if (zlLib->symTab != NULL) { + GH_delete(zlLib->symTab); + zlLib->symTab = NULL; + } + /* delete DOFF desc since it holds *lots* of host OS + * resources */ + dofClose(zlLib); func_end: DBC_Ensure(zlLib->loadRef >= 0); } -- 1.5.6.5 -- 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