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/chips/cfi_cmdset_0002.c | |
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/chips/cfi_cmdset_0002.c')
-rw-r--r-- | drivers/mtd/chips/cfi_cmdset_0002.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/mtd/chips/cfi_cmdset_0002.c b/drivers/mtd/chips/cfi_cmdset_0002.c index 8505f118f2db..0e6475050da9 100644 --- a/drivers/mtd/chips/cfi_cmdset_0002.c +++ b/drivers/mtd/chips/cfi_cmdset_0002.c | |||
@@ -378,8 +378,7 @@ static struct mtd_info *cfi_amdstd_setup(struct mtd_info *mtd) | |||
378 | 378 | ||
379 | setup_err: | 379 | setup_err: |
380 | if(mtd) { | 380 | if(mtd) { |
381 | if(mtd->eraseregions) | 381 | kfree(mtd->eraseregions); |
382 | kfree(mtd->eraseregions); | ||
383 | kfree(mtd); | 382 | kfree(mtd); |
384 | } | 383 | } |
385 | kfree(cfi->cmdset_priv); | 384 | kfree(cfi->cmdset_priv); |
@@ -1742,6 +1741,7 @@ static void cfi_amdstd_destroy(struct mtd_info *mtd) | |||
1742 | { | 1741 | { |
1743 | struct map_info *map = mtd->priv; | 1742 | struct map_info *map = mtd->priv; |
1744 | struct cfi_private *cfi = map->fldrv_priv; | 1743 | struct cfi_private *cfi = map->fldrv_priv; |
1744 | |||
1745 | kfree(cfi->cmdset_priv); | 1745 | kfree(cfi->cmdset_priv); |
1746 | kfree(cfi->cfiq); | 1746 | kfree(cfi->cfiq); |
1747 | kfree(cfi); | 1747 | kfree(cfi); |