Commit ed6f2b4d authored by Arjan van de Ven's avatar Arjan van de Ven Committed by Matthew Garrett

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: default avatarArjan van de Ven <arjan@linux.intel.com>
Signed-off-by: default avatarAlan Cox <alan@linux.intel.com>
Signed-off-by: default avatarMatthew Garrett <mjg@redhat.com>
parent 51cd525d
......@@ -162,6 +162,8 @@ static int pwr_reg_rdwr(u16 *addr, u8 *data, u32 count, u32 op, u32 id)
mutex_lock(&ipclock);
memset(cbuf, 0, sizeof(cbuf));
if (ipcdev.pdev == NULL) {
mutex_unlock(&ipclock);
return -ENODEV;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment