linux/drivers/media
Julia Lawall d1bb4b29a7 [media] drivers/media/platform/mx2_emmaprp.c: use devm_kzalloc and devm_clk_get
Using devm_kzalloc simplifies the code and ensures that the use of
devm_request_irq is safe.  When kzalloc and kfree were used, the interrupt
could be triggered after the handler's data argument had been freed.

This also introduces some missing initializations of the return variable
ret, and uses devm_request_and_ioremap instead of the combination of
devm_request_mem_region and devm_ioremap.

The problem of a free after a devm_request_irq was found using the
following semantic match (http://coccinelle.lip6.fr/)

// <smpl>
@r exists@
expression e1,e2,x,a,b,c,d;
identifier free;
position p1,p2;
@@

  devm_request_irq@p1(e1,e2,...,x)
  ... when any
      when != e2 = a
      when != x = b
  if (...) {
    ... when != e2 = c
        when != x = d
    free@p2(...,x,...);
    ...
    return ...;
  }
// </smpl>

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-08-15 18:58:52 -03:00
..
common [media] siano: break it into common, mmc and usb 2012-08-13 23:52:52 -03:00
dvb-core [media] dvb: move the dvb core one level up 2012-08-13 23:08:14 -03:00
dvb-frontends [media] it913x-fe: use ARRAY_SIZE() as a cleanup 2012-08-15 18:47:10 -03:00
firewire [media] firewire: move it one level up 2012-08-13 23:20:36 -03:00
i2c [media] ov772x: Stop sensor readout right after reset 2012-08-15 17:12:38 -03:00
mmc [media] mmc/Kconfig: Improve driver name for siano mmc/sdio driver 2012-08-15 16:41:47 -03:00
parport [media] move parallel port/isa video drivers to drivers/media/parport/ 2012-08-15 16:41:37 -03:00
pci [media] move i2c files into drivers/media/i2c 2012-08-15 16:42:14 -03:00
platform [media] drivers/media/platform/mx2_emmaprp.c: use devm_kzalloc and devm_clk_get 2012-08-15 18:58:52 -03:00
radio [media] radio-shark2: use %*ph to print small buffers 2012-08-13 16:38:49 -03:00
rc [media] rc/Kconfig: Fix a warning 2012-08-13 23:00:33 -03:00
tuners [media] common: move media/common/tuners to media/tuners 2012-08-13 23:40:28 -03:00
usb [media] stk1160: remove unneeded check 2012-08-15 18:53:29 -03:00
v4l2-core [media] reorganize the API core items 2012-08-15 16:42:00 -03:00
Kconfig [media] rename drivers/media/video as .../platform 2012-08-15 16:43:09 -03:00
Makefile [media] rename drivers/media/video as .../platform 2012-08-15 16:43:09 -03:00
media-device.c [media] media: fix MEDIA_IOC_DEVICE_INFO return code 2012-08-12 07:57:57 -03:00
media-devnode.c Disintegrate and delete asm/system.h 2012-03-28 15:58:21 -07:00
media-entity.c [media] media: Add link_validate() op to check links to the sink pad 2012-05-14 08:44:11 -03:00