return PTR_ERR(dentry);
}
+ mutex_lock(&dev_drv->front_lock);
if (!num_frames) {
- mutex_lock(&dev_drv->front_lock);
-
if (!dev_drv->front_regs) {
u16 xact, yact;
int data_format;
u32 dsp_addr;
int ymirror;
- mutex_unlock(&dev_drv->front_lock);
-
if (dev_drv->ops->get_dspbuf_info)
dev_drv->ops->get_dspbuf_info(dev_drv, &xact,
&yact, &data_format, &dsp_addr,
goto out;
}
front_regs = kmalloc(sizeof(*front_regs), GFP_KERNEL);
- if (!front_regs)
+ if (!front_regs) {
+ mutex_unlock(&dev_drv->front_lock);
return -ENOMEM;
+ }
memcpy(front_regs, dev_drv->front_regs, sizeof(*front_regs));
for (i = 0; i < front_regs->win_num; i++) {
}
kfree(front_regs);
-
- mutex_unlock(&dev_drv->front_lock);
} else {
trace->num_frames = num_frames;
trace->count_frame = 0;
trace->mask_area = mask_area;
}
out:
-
+ mutex_unlock(&dev_drv->front_lock);
return count;
}