linux-stable/drivers/mtd
Himangi Saraogi 0c53be9de8 mtd: bf5xx_nand: use 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. Also, the now unnecessary label out_err_hw_init is done away
with and the label out_err_kzalloc is renamed to out_err.

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: Brian Norris <computersforpeace@gmail.com>
2014-05-28 13:27:55 -07:00
..
chips mtd: Kconfig: give the CFI command set version in prompt and help 2014-05-20 17:36:43 -07:00
devices mtd: slram: fix unused variable warning 2014-05-28 00:05:24 -07:00
lpddr mtd: lpddr: fix Kconfig dependency, for I/O accessors 2014-05-26 10:38:25 -07:00
maps mtd: maps: sc520cdp: fix warnings 2014-05-28 00:05:24 -07:00
nand mtd: bf5xx_nand: use the managed version of kzalloc 2014-05-28 13:27:55 -07:00
onenand mtd: onenand: fix build warning for dma type 2014-05-20 16:35:31 -07:00
spi-nor mtd: spi-nor: Enable Dual and Quad SPI read transfers for s25sl032p 2014-05-12 13:16:26 -07:00
tests mtd: mtd_oobtest: generate consistent data for verification 2014-04-17 22:22:03 -07:00
ubi MTD updates for 3.15: 2014-04-07 10:17:30 -07:00
afs.c mtd: make register_mtd_parser return void 2014-01-03 11:22:22 -08:00
ar7part.c mtd: make register_mtd_parser return void 2014-01-03 11:22:22 -08:00
bcm47xxpart.c mtd: bcm47xxpart: allow enabling on ARCH_BCM_5301X 2014-03-10 22:42:29 -07:00
bcm63xxpart.c mtd: make register_mtd_parser return void 2014-01-03 11:22:22 -08:00
cmdlinepart.c mtd: make register_mtd_parser return void 2014-01-03 11:22:22 -08:00
ftl.c
inftlcore.c mtd: nand: add a helper to detect the nand type 2013-10-27 16:27:06 -07:00
inftlmount.c mtd: delete non-required instances of include <linux/init.h> 2014-03-10 22:42:22 -07:00
Kconfig mtd: spi-nor: add the framework for SPI NOR 2014-04-14 11:22:58 -07:00
Makefile mtd: spi-nor: shorten Kconfig naming 2014-04-14 11:23:01 -07:00
mtd_blkdevs.c mtd: mtd_blkdevs: handle REQ_FLUSH request and do explicit flush of writeback buffer 2014-04-15 23:25:37 -07:00
mtdblock.c mtd: Move major number definitions to major.h 2013-11-06 23:32:59 -08:00
mtdblock_ro.c mtd: Move major number definitions to major.h 2013-11-06 23:32:59 -08:00
mtdchar.c mtd: Fix warning in access_ok() parameter passing 2014-05-20 16:35:29 -07:00
mtdconcat.c
mtdcore.c mtd: Fix the behavior of OTP write if there is not enough room for data 2014-03-10 22:42:31 -07:00
mtdcore.h
mtdoops.c
mtdpart.c mtd: Add a retlen parameter to _get_{fact,user}_prot_info 2014-03-10 22:42:28 -07:00
mtdsuper.c mtd: Move major number definitions to major.h 2013-11-06 23:32:59 -08:00
mtdswap.c
nftlcore.c mtd: nand: add a helper to detect the nand type 2013-10-27 16:27:06 -07:00
nftlmount.c
ofpart.c mtd: make register_mtd_parser return void 2014-01-03 11:22:22 -08:00
redboot.c mtd: make register_mtd_parser return void 2014-01-03 11:22:22 -08:00
rfd_ftl.c mtd: remove some duplicative checks 2014-03-10 22:42:25 -07:00
sm_ftl.c mtd: sm_ftl: heap corruption in sm_create_sysfs_attributes() 2014-03-10 22:42:21 -07:00
sm_ftl.h
ssfdc.c mtd: nand: add a helper to detect the nand type 2013-10-27 16:27:06 -07:00