Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Merge tag 'media/v4.11-3' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media

Pull media fixes from Mauro Carvalho Chehab:

- dvb-usb-firmware: don't do DMA on stack

- coda/imx-vdoa: platform_driver should not be const

- bdisp: Clean up file handle in open() error path

- exynos-gsc: Do not swap cb/cr for semi planar formats

* tag 'media/v4.11-3' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media:
[media] exynos-gsc: Do not swap cb/cr for semi planar formats
[media] bdisp: Clean up file handle in open() error path
[media] coda/imx-vdoa: platform_driver should not be const
[media] dvb-usb-firmware: don't do DMA on stack

+14 -14
+1 -1
drivers/media/platform/coda/imx-vdoa.c
··· 321 321 }; 322 322 MODULE_DEVICE_TABLE(of, vdoa_dt_ids); 323 323 324 - static const struct platform_driver vdoa_driver = { 324 + static struct platform_driver vdoa_driver = { 325 325 .probe = vdoa_probe, 326 326 .remove = vdoa_remove, 327 327 .driver = {
-2
drivers/media/platform/exynos-gsc/gsc-core.c
··· 861 861 862 862 if ((frame->fmt->pixelformat == V4L2_PIX_FMT_VYUY) || 863 863 (frame->fmt->pixelformat == V4L2_PIX_FMT_YVYU) || 864 - (frame->fmt->pixelformat == V4L2_PIX_FMT_NV61) || 865 864 (frame->fmt->pixelformat == V4L2_PIX_FMT_YVU420) || 866 - (frame->fmt->pixelformat == V4L2_PIX_FMT_NV21) || 867 865 (frame->fmt->pixelformat == V4L2_PIX_FMT_YVU420M)) 868 866 swap(addr->cb, addr->cr); 869 867
+1 -1
drivers/media/platform/sti/bdisp/bdisp-v4l2.c
··· 632 632 633 633 error_ctrls: 634 634 bdisp_ctrls_delete(ctx); 635 - error_fh: 636 635 v4l2_fh_del(&ctx->fh); 636 + error_fh: 637 637 v4l2_fh_exit(&ctx->fh); 638 638 bdisp_hw_free_nodes(ctx); 639 639 mem_ctx:
+12 -10
drivers/media/usb/dvb-usb/dvb-usb-firmware.c
··· 36 36 int usb_cypress_load_firmware(struct usb_device *udev, const struct firmware *fw, int type) 37 37 { 38 38 struct hexline *hx; 39 - u8 reset; 40 - int ret,pos=0; 39 + u8 *buf; 40 + int ret, pos = 0; 41 + u16 cpu_cs_register = cypress[type].cpu_cs_register; 41 42 42 - hx = kmalloc(sizeof(*hx), GFP_KERNEL); 43 - if (!hx) 43 + buf = kmalloc(sizeof(*hx), GFP_KERNEL); 44 + if (!buf) 44 45 return -ENOMEM; 46 + hx = (struct hexline *)buf; 45 47 46 48 /* stop the CPU */ 47 - reset = 1; 48 - if ((ret = usb_cypress_writemem(udev,cypress[type].cpu_cs_register,&reset,1)) != 1) 49 + buf[0] = 1; 50 + if (usb_cypress_writemem(udev, cpu_cs_register, buf, 1) != 1) 49 51 err("could not stop the USB controller CPU."); 50 52 51 53 while ((ret = dvb_usb_get_hexline(fw, hx, &pos)) > 0) { ··· 63 61 } 64 62 if (ret < 0) { 65 63 err("firmware download failed at %d with %d",pos,ret); 66 - kfree(hx); 64 + kfree(buf); 67 65 return ret; 68 66 } 69 67 70 68 if (ret == 0) { 71 69 /* restart the CPU */ 72 - reset = 0; 73 - if (ret || usb_cypress_writemem(udev,cypress[type].cpu_cs_register,&reset,1) != 1) { 70 + buf[0] = 0; 71 + if (usb_cypress_writemem(udev, cpu_cs_register, buf, 1) != 1) { 74 72 err("could not restart the USB controller CPU."); 75 73 ret = -EINVAL; 76 74 } 77 75 } else 78 76 ret = -EIO; 79 77 80 - kfree(hx); 78 + kfree(buf); 81 79 82 80 return ret; 83 81 }