intel_scu_ipc: return -EIO for error condition in busy_loop
authorHong Liu <[email protected]>
Mon, 26 Jul 2010 09:06:12 +0000 (10:06 +0100)
committerMatthew Garrett <[email protected]>
Tue, 3 Aug 2010 13:50:33 +0000 (09:50 -0400)
Signed-off-by: Hong Liu <[email protected]>
Signed-off-by: Alan Cox <[email protected]>
Signed-off-by: Matthew Garrett <[email protected]>
drivers/platform/x86/intel_scu_ipc.c

index 84a2d4bfdec81dbac93e57a04d5e0039c9907e26..23b6d46a4b8faa71abafc338084b780cd0d9e499 100644 (file)
@@ -148,7 +148,10 @@ static inline int busy_loop(void) /* Wait till scu status is busy */
                        return -ETIMEDOUT;
                }
        }
-       return (status >> 1) & 1;
+       if ((status >> 1) & 1)
+               return -EIO;
+
+       return 0;
 }
 
 /* Read/Write power control(PMIC in Langwell, MSIC in PenWell) registers */