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/inftlcore.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/inftlcore.c')
-rw-r--r-- | drivers/mtd/inftlcore.c | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/drivers/mtd/inftlcore.c b/drivers/mtd/inftlcore.c index 39eb53f6551f..8db65bf029ea 100644 --- a/drivers/mtd/inftlcore.c +++ b/drivers/mtd/inftlcore.c | |||
@@ -126,10 +126,8 @@ static void inftl_add_mtd(struct mtd_blktrans_ops *tr, struct mtd_info *mtd) | |||
126 | } | 126 | } |
127 | 127 | ||
128 | if (add_mtd_blktrans_dev(&inftl->mbd)) { | 128 | if (add_mtd_blktrans_dev(&inftl->mbd)) { |
129 | if (inftl->PUtable) | 129 | kfree(inftl->PUtable); |
130 | kfree(inftl->PUtable); | 130 | kfree(inftl->VUtable); |
131 | if (inftl->VUtable) | ||
132 | kfree(inftl->VUtable); | ||
133 | kfree(inftl); | 131 | kfree(inftl); |
134 | return; | 132 | return; |
135 | } | 133 | } |
@@ -147,10 +145,8 @@ static void inftl_remove_dev(struct mtd_blktrans_dev *dev) | |||
147 | 145 | ||
148 | del_mtd_blktrans_dev(dev); | 146 | del_mtd_blktrans_dev(dev); |
149 | 147 | ||
150 | if (inftl->PUtable) | 148 | kfree(inftl->PUtable); |
151 | kfree(inftl->PUtable); | 149 | kfree(inftl->VUtable); |
152 | if (inftl->VUtable) | ||
153 | kfree(inftl->VUtable); | ||
154 | kfree(inftl); | 150 | kfree(inftl); |
155 | } | 151 | } |
156 | 152 | ||