瀏覽代碼

intel_scu_ipc: return -EIO for error condition in busy_loop

Signed-off-by: Hong Liu <hong.liu@intel.com>
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
Hong Liu 15 年之前
父節點
當前提交
77e01d6d17
共有 1 個文件被更改,包括 4 次插入1 次删除
  1. 4 1
      drivers/platform/x86/intel_scu_ipc.c

+ 4 - 1
drivers/platform/x86/intel_scu_ipc.c

@@ -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 */