diff mbox

DSPBRIDGE: dont pass invalid DSP OPP requests

Message ID 1263951848-16822-1-git-send-email-nm@ti.com (mailing list archive)
State Awaiting Upstream, archived
Headers show

Commit Message

Nishanth Menon Jan. 20, 2010, 1:44 a.m. UTC
None
diff mbox

Patch

diff --git a/drivers/dsp/bridge/wmd/io_sm.c b/drivers/dsp/bridge/wmd/io_sm.c
index 6c140c5..618bedb 100644
--- a/drivers/dsp/bridge/wmd/io_sm.c
+++ b/drivers/dsp/bridge/wmd/io_sm.c
@@ -960,9 +960,12 @@  static void IO_DispatchPM(struct work_struct *work)
 			pArg[1] = pIOMgr->pSharedMem->oppRequest.rqstOppPt;
 			DBG_Trace(DBG_LEVEL7, "IO_DispatchPM : Value of OPP "
 				 "value =0x%x \n", pArg[1]);
-			status = pIOMgr->pIntfFxns->pfnDevCntrl(pIOMgr->
-				 hWmdContext, WMDIOCTL_CONSTRAINT_REQUEST,
-				 pArg);
+			if (!pArg[1])
+				status = DSP_EINVALIDARG;
+			else
+				status = pIOMgr->pIntfFxns->pfnDevCntrl(pIOMgr->
+					 hWmdContext,
+					 WMDIOCTL_CONSTRAINT_REQUEST, pArg);
 			if (DSP_FAILED(status)) {
 				DBG_Trace(DBG_LEVEL7, "IO_DispatchPM : Failed "
 					 "to set constraint = 0x%x \n",