Message ID | 20181106120724.GA79146@athens (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | media: meson: fix zalloc-simple.cocci warnings | expand |
--- a/drivers/media/platform/meson/vdec/esparser.c +++ b/drivers/media/platform/meson/vdec/esparser.c @@ -145,13 +145,11 @@ int esparser_queue_eos(struct amvdec_cor dma_addr_t eos_paddr; int ret; - eos_vaddr = dma_alloc_coherent(dev, - len + SEARCH_PATTERN_LEN, - &eos_paddr, GFP_KERNEL); + eos_vaddr = dma_zalloc_coherent(dev, len + SEARCH_PATTERN_LEN, + &eos_paddr, GFP_KERNEL); if (!eos_vaddr) return -ENOMEM; - memset(eos_vaddr, 0, len + SEARCH_PATTERN_LEN); memcpy(eos_vaddr, data, len); ret = esparser_write_data(core, eos_paddr, len); dma_free_coherent(dev, len + SEARCH_PATTERN_LEN,