From: Andy Shevchenko <ext-andriy.shevchenko@xxxxxxxxx> Signed-off-by: Andy Shevchenko <ext-andriy.shevchenko@xxxxxxxxx> --- drivers/dsp/bridge/rmgr/nldr.c | 15 ++++++++++++++- 1 files changed, 14 insertions(+), 1 deletions(-) diff --git a/drivers/dsp/bridge/rmgr/nldr.c b/drivers/dsp/bridge/rmgr/nldr.c index 79f7505..8c162a1 100644 --- a/drivers/dsp/bridge/rmgr/nldr.c +++ b/drivers/dsp/bridge/rmgr/nldr.c @@ -1560,6 +1560,13 @@ static DSP_STATUS LoadOvly(struct NLDR_NODEOBJECT *hNldrNode, } DBC_Assert(i < hNldr->nOvlyNodes); + + if (!pONode) { + /* Should we print warning here? */ + status = DSP_ENOTFOUND; + goto func_end; + } + switch (phase) { case NLDR_CREATE: pRefCount = &(pONode->createRef); @@ -1877,6 +1884,13 @@ static void UnloadOvly(struct NLDR_NODEOBJECT *hNldrNode, enum NLDR_PHASE phase) } DBC_Assert(i < hNldr->nOvlyNodes); + + if (!pONode) { + /* Should we print warning here? */ + status = DSP_ENOTFOUND; + goto func_end; + } + switch (phase) { case NLDR_CREATE: pRefCount = &(pONode->createRef); @@ -1917,7 +1931,6 @@ static void UnloadOvly(struct NLDR_NODEOBJECT *hNldrNode, enum NLDR_PHASE phase) } if (pOtherRef && *pOtherRef == 0) FreeSects(hNldr, pOtherSects, nOtherAlloc); - } /* -- 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