summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArtem Bityutskiy <Artem.Bityutskiy@nokia.com>2009-01-20 16:48:02 +0100
committerArtem Bityutskiy <Artem.Bityutskiy@nokia.com>2009-01-20 17:13:53 +0100
commit8c4c19f1367435afdc16ac122a2a95a4d6cff9f0 (patch)
tree99cc2c9f6d2321b1ee55c339296c037ae4ec8c69
parentUBI: use nicer 64-bit math (diff)
downloadlinux-8c4c19f1367435afdc16ac122a2a95a4d6cff9f0.tar.xz
linux-8c4c19f1367435afdc16ac122a2a95a4d6cff9f0.zip
UBI: remove unused variable
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
-rw-r--r--drivers/mtd/ubi/build.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/mtd/ubi/build.c b/drivers/mtd/ubi/build.c
index 9082768cc6c3..09a326ecd05b 100644
--- a/drivers/mtd/ubi/build.c
+++ b/drivers/mtd/ubi/build.c
@@ -380,7 +380,7 @@ static void free_user_volumes(struct ubi_device *ubi)
*/
static int uif_init(struct ubi_device *ubi)
{
- int i, err, do_free = 0;
+ int i, err;
dev_t dev;
sprintf(ubi->ubi_name, UBI_NAME_STR "%d", ubi->ubi_num);
@@ -427,13 +427,10 @@ static int uif_init(struct ubi_device *ubi)
out_volumes:
kill_volumes(ubi);
- do_free = 0;
out_sysfs:
ubi_sysfs_close(ubi);
cdev_del(&ubi->cdev);
out_unreg:
- if (do_free)
- free_user_volumes(ubi);
unregister_chrdev_region(ubi->cdev.dev, ubi->vtbl_slots + 1);
ubi_err("cannot initialize UBI %s, error %d", ubi->ubi_name, err);
return err;