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/maps/integrator-flash.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/maps/integrator-flash.c')
-rw-r--r-- | drivers/mtd/maps/integrator-flash.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/mtd/maps/integrator-flash.c b/drivers/mtd/maps/integrator-flash.c index d14a0185b8f4..93f50d6d5488 100644 --- a/drivers/mtd/maps/integrator-flash.c +++ b/drivers/mtd/maps/integrator-flash.c | |||
@@ -148,8 +148,7 @@ static int armflash_probe(struct device *_dev) | |||
148 | del_mtd_partitions(info->mtd); | 148 | del_mtd_partitions(info->mtd); |
149 | map_destroy(info->mtd); | 149 | map_destroy(info->mtd); |
150 | } | 150 | } |
151 | if (info->parts) | 151 | kfree(info->parts); |
152 | kfree(info->parts); | ||
153 | 152 | ||
154 | no_device: | 153 | no_device: |
155 | iounmap(base); | 154 | iounmap(base); |
@@ -176,8 +175,7 @@ static int armflash_remove(struct device *_dev) | |||
176 | del_mtd_partitions(info->mtd); | 175 | del_mtd_partitions(info->mtd); |
177 | map_destroy(info->mtd); | 176 | map_destroy(info->mtd); |
178 | } | 177 | } |
179 | if (info->parts) | 178 | kfree(info->parts); |
180 | kfree(info->parts); | ||
181 | 179 | ||
182 | iounmap(info->map.virt); | 180 | iounmap(info->map.virt); |
183 | release_resource(info->res); | 181 | release_resource(info->res); |