When leaving the loop waiting for the dsp to transition
from its power state, timeout value will be negative, therefore
a print for "timeout waiting for the dsp" won't be displayed, as
the condition to check for is !timeout.

Reported-by: Berenice Herrera <[email protected]>
Signed-off-by: Omar Ramirez Luna <[email protected]>
---
 drivers/dsp/bridge/wmd/tiomap3430_pwr.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/dsp/bridge/wmd/tiomap3430_pwr.c 
b/drivers/dsp/bridge/wmd/tiomap3430_pwr.c
index 084f406..96b942b 100644
--- a/drivers/dsp/bridge/wmd/tiomap3430_pwr.c
+++ b/drivers/dsp/bridge/wmd/tiomap3430_pwr.c
@@ -239,7 +239,7 @@ DSP_STATUS SleepDSP(struct WMD_DEV_CONTEXT *pDevContext, IN 
u32 dwCmd,
                        &pwrState);
 
        /* Wait for DSP to move into target power state */
-       while ((pwrState != targetPwrState) && timeout--) {
+       while ((pwrState != targetPwrState) && --timeout) {
                if (msleep_interruptible(10)) {
                        pr_err("Waiting for DSP to Suspend interrupted\n");
                        return DSP_EFAIL;
-- 
1.6.2.4

--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to