Commit ed6f2b4da32913875355f5c9cbbb38e4168b7801

Authored by Arjan van de Ven
Committed by Matthew Garrett
1 parent 51cd525dce

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>

Showing 1 changed file with 2 additions and 0 deletions Side-by-side Diff

drivers/platform/x86/intel_scu_ipc.c
... ... @@ -162,6 +162,8 @@
162 162  
163 163 mutex_lock(&ipclock);
164 164  
  165 + memset(cbuf, 0, sizeof(cbuf));
  166 +
165 167 if (ipcdev.pdev == NULL) {
166 168 mutex_unlock(&ipclock);
167 169 return -ENODEV;