Hi, Please see my comments below. >-----Original Message----- >From: linux-omap-owner@xxxxxxxxxxxxxxx [mailto:linux-omap- >owner@xxxxxxxxxxxxxxx] On Behalf Of Andy Shevchenko >Sent: Thursday, August 27, 2009 7:19 AM >To: linux-omap@xxxxxxxxxxxxxxx >Cc: Andy Shevchenko >Subject: [PATCH 8/8] dspbridge: Check pointer before usage > >From: Andy Shevchenko <ext-andriy.shevchenko@xxxxxxxxx> > >Signed-off-by: Andy Shevchenko <ext-andriy.shevchenko@xxxxxxxxx> >--- > drivers/dsp/bridge/rmgr/drv.c | 4 ++++ > 1 files changed, 4 insertions(+), 0 deletions(-) > >diff --git a/drivers/dsp/bridge/rmgr/drv.c b/drivers/dsp/bridge/rmgr/drv.c >index d21071c..491dd39 100644 >--- a/drivers/dsp/bridge/rmgr/drv.c >+++ b/drivers/dsp/bridge/rmgr/drv.c >@@ -1545,6 +1545,10 @@ DSP_STATUS DRV_ReleaseResources(u32 dwContext, >struct DRV_OBJECT *hDrvObject) > for (pszdevNode = (struct DRV_EXT *)DRV_GetFirstDevExtension(); > pszdevNode != NULL; pszdevNode = (struct DRV_EXT *) > DRV_GetNextDevExtension((u32)pszdevNode)) { >+ if (!pDRVObject->devNodeString) { >+ /* When this could happen? */ >+ continue; >+ } The function DSP_STATUS DRV_ReleaseResources is only called after call DRV_Create where the list is created: ... /* Create and Initialize List of device Extension */ pDRVObject->devNodeString = LST_Create(); ... If the list creation fails DRV_ReleaseResources is never call neither. Even if it was possible pDRVObject->devNodeString is not changing between "for" iterations so if you put a "continue" it will enter to the "for" loop and check again pDRVObject->devNodeString what will be still null, so I think is should be a "break" instead of "continue". What do you think? > if ((u32)pszdevNode == dwContext) { > /* Found it */ > /* Delete from the Driver object list */ >-- >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 Regards, Fernando. -- 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