linux/drivers/media
Himangi Saraogi 30616fff65 [media] timblogiw: Introduce the use of the managed version of kzalloc
This patch moves data allocated using kzalloc to managed data allocated
using devm_kzalloc and cleans now unnecessary kfrees in probe and remove
functions.The label err_register is removed as it is no longer required.

The following Coccinelle semantic patch was used for making the change:

@platform@
identifier p, probefn, removefn;
@@
struct platform_driver p = {
  .probe = probefn,
  .remove = removefn,
};

@prb@
identifier platform.probefn, pdev;
expression e, e1, e2;
@@
probefn(struct platform_device *pdev, ...) {
  <+...
- e = kzalloc(e1, e2)
+ e = devm_kzalloc(&pdev->dev, e1, e2)
  ...
?-kfree(e);
  ...+>
}

@rem depends on prb@
identifier platform.removefn;
expression e;
@@
removefn(...) {
  <...
- kfree(e);
  ...>
}

Signed-off-by: Himangi Saraogi <himangi774@gmail.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-05-23 12:19:19 -03:00
..
common [media] rc: abstract access to allowed/enabled protocols 2014-03-11 13:24:39 -03:00
dvb-core [media] rtl28xxu: add [1b80:d3af] Sveon STV27 2014-05-13 20:25:47 -03:00
dvb-frontends [media] si2168: relax demod lock checks a little 2014-04-23 09:54:26 -03:00
firewire firewire: introduce fw_driver.probe and .remove methods 2013-06-09 18:15:00 +02:00
i2c [media] smiapp: Return correct return value in smiapp_registered() 2014-05-23 11:41:28 -03:00
mmc [media] siano: get rid of CammelCase from smscoreapi.h 2013-03-21 10:03:16 -03:00
parport [media] media: parport: Fix format string mismatch in bw-qcam.c 2014-05-23 12:18:53 -03:00
pci [media] av7110: fix confusing indenting 2014-05-23 12:15:11 -03:00
platform [media] timblogiw: Introduce the use of the managed version of kzalloc 2014-05-23 12:19:19 -03:00
radio [media] si4713: fix Kconfig dependencies 2014-03-28 18:06:55 -03:00
rc [media] rc-core: remove generic scancode filter 2014-04-06 11:30:29 -03:00
tuners Linux 3.15-rc6 2014-05-21 23:03:15 -03:00
usb [media] s2255: Do not free fw_data until timer handler has actually stopped using it 2014-05-23 12:16:39 -03:00
v4l2-core [media] videobuf2-dma-sg: Fix NULL pointer dereference BUG 2014-05-23 12:18:23 -03:00
Kconfig [media] subdev autoselect only works if I2C and I2C_MUX is selected 2013-12-21 06:03:06 -02:00
Makefile [media] move i2c files into drivers/media/i2c 2012-09-06 18:42:54 -03:00
media-device.c Linux 3.15-rc6 2014-05-21 23:03:15 -03:00
media-devnode.c [media] media: Use a better owner for the media device 2014-05-13 13:39:00 -03:00
media-entity.c [media] media: Check for active links on pads with MEDIA_PAD_FL_MUST_CONNECT flag 2013-12-04 15:03:45 -02:00