diff --git a/drivers/video/msm/vidc/common/vcd/vcd_sub.c b/drivers/video/msm/vidc/common/vcd/vcd_sub.c index e8a35c8b9dc8..a337d7bfae48 100644 --- a/drivers/video/msm/vidc/common/vcd/vcd_sub.c +++ b/drivers/video/msm/vidc/common/vcd/vcd_sub.c @@ -784,7 +784,11 @@ u32 vcd_free_one_buffer_internal( buf_pool->allocated--; } - memset(buf_entry, 0, sizeof(struct vcd_buffer_entry)); + buf_entry->valid = buf_entry->allocated = buf_entry->in_use = 0; + buf_entry->alloc = buf_entry->virtual = buf_entry->physical = NULL; + buf_entry->sz = 0; + memset(&buf_entry->frame, 0, sizeof(struct vcd_frame_data)); + buf_pool->validated--; if (buf_pool->validated == 0) vcd_free_buffer_pool_entries(buf_pool);