diff options
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 | ||