intel_scu_ipc: move local memory initialization out of a mutex
'{ }' and memset will both reset the cbuf buffer. Only once is enough and this can be done outside fo the mutex. Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr> Signed-off-by: Darren Hart <dvhart@linux.intel.com>steinar/wifi_calib_4_9_kernel
parent
02941007f5
commit
8642d7f836
|
@ -216,13 +216,13 @@ static int pwr_reg_rdwr(u16 *addr, u8 *data, u32 count, u32 op, u32 id)
|
||||||
int nc;
|
int nc;
|
||||||
u32 offset = 0;
|
u32 offset = 0;
|
||||||
int err;
|
int err;
|
||||||
u8 cbuf[IPC_WWBUF_SIZE] = { };
|
u8 cbuf[IPC_WWBUF_SIZE];
|
||||||
u32 *wbuf = (u32 *)&cbuf;
|
u32 *wbuf = (u32 *)&cbuf;
|
||||||
|
|
||||||
mutex_lock(&ipclock);
|
|
||||||
|
|
||||||
memset(cbuf, 0, sizeof(cbuf));
|
memset(cbuf, 0, sizeof(cbuf));
|
||||||
|
|
||||||
|
mutex_lock(&ipclock);
|
||||||
|
|
||||||
if (ipcdev.pdev == NULL) {
|
if (ipcdev.pdev == NULL) {
|
||||||
mutex_unlock(&ipclock);
|
mutex_unlock(&ipclock);
|
||||||
return -ENODEV;
|
return -ENODEV;
|
||||||
|
|
Loading…
Reference in New Issue