diff options
author | Jesper Juhl <jesper.juhl@gmail.com> | 2005-11-07 04:01:27 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2005-11-07 10:54:02 -0500 |
commit | fa671646f61182cd18234461a6e65f50c6558695 (patch) | |
tree | 79d5fe8cbfdf9670456538837e60c695e6875006 /drivers/mtd/devices | |
parent | c9475cb0c358ff0dd473544280d92482df491913 (diff) |
[PATCH] kfree cleanup: drivers/mtd
This is the drivers/mtd part of the big kfree cleanup patch.
Remove pointless checks for NULL prior to calling kfree() in drivers/mtd/.
Signed-off-by: Jesper Juhl <jesper.juhl@gmail.com>
Cc: David Woodhouse <dwmw2@infradead.org>
Acked-by: Joern Engel <joern@wohnheim.fh-wedel.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/mtd/devices')
-rw-r--r-- | drivers/mtd/devices/blkmtd.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/drivers/mtd/devices/blkmtd.c b/drivers/mtd/devices/blkmtd.c index 662e807801ed..59a29e616a22 100644 --- a/drivers/mtd/devices/blkmtd.c +++ b/drivers/mtd/devices/blkmtd.c | |||
@@ -539,11 +539,8 @@ static void free_device(struct blkmtd_dev *dev) | |||
539 | { | 539 | { |
540 | DEBUG(2, "blkmtd: free_device() dev = %p\n", dev); | 540 | DEBUG(2, "blkmtd: free_device() dev = %p\n", dev); |
541 | if(dev) { | 541 | if(dev) { |
542 | if(dev->mtd_info.eraseregions) | 542 | kfree(dev->mtd_info.eraseregions); |
543 | kfree(dev->mtd_info.eraseregions); | 543 | kfree(dev->mtd_info.name); |
544 | if(dev->mtd_info.name) | ||
545 | kfree(dev->mtd_info.name); | ||
546 | |||
547 | if(dev->blkdev) { | 544 | if(dev->blkdev) { |
548 | invalidate_inode_pages(dev->blkdev->bd_inode->i_mapping); | 545 | invalidate_inode_pages(dev->blkdev->bd_inode->i_mapping); |
549 | close_bdev_excl(dev->blkdev); | 546 | close_bdev_excl(dev->blkdev); |