aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/platform
diff options
context:
space:
mode:
authorArjan van de Ven <arjan@linux.intel.com>2010-07-26 05:04:37 -0400
committerMatthew Garrett <mjg@redhat.com>2010-08-03 09:50:31 -0400
commited6f2b4da32913875355f5c9cbbb38e4168b7801 (patch)
treeeb195b81e86a047653f60e8ae17616a1252b143f /drivers/platform
parent51cd525dce018f298568d8e2e769b1a698ef91cd (diff)
zero the stack buffer before giving random garbage to the SCU
some messages take 4 bytes, but only fill 3 bytes.... this patch makes sure that whatever we send to the SCU is zeroed first Signed-off-by: Arjan van de Ven <arjan@linux.intel.com> Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Matthew Garrett <mjg@redhat.com>
Diffstat (limited to 'drivers/platform')
-rw-r--r--drivers/platform/x86/intel_scu_ipc.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/platform/x86/intel_scu_ipc.c b/drivers/platform/x86/intel_scu_ipc.c
index 1b0d0d54cb0f..b903420fa973 100644
--- a/drivers/platform/x86/intel_scu_ipc.c
+++ b/drivers/platform/x86/intel_scu_ipc.c
@@ -162,6 +162,8 @@ static int pwr_reg_rdwr(u16 *addr, u8 *data, u32 count, u32 op, u32 id)
162 162
163 mutex_lock(&ipclock); 163 mutex_lock(&ipclock);
164 164
165 memset(cbuf, 0, sizeof(cbuf));
166
165 if (ipcdev.pdev == NULL) { 167 if (ipcdev.pdev == NULL) {
166 mutex_unlock(&ipclock); 168 mutex_unlock(&ipclock);
167 return -ENODEV; 169 return -ENODEV;