summaryrefslogtreecommitdiffstats
path: root/drivers/mtd
diff options
context:
space:
mode:
authorVinit Agnihotri <vinit.agnihotri@gmail.com>2007-07-04 15:35:56 +0200
committerArtem Bityutskiy <Artem.Bityutskiy@nokia.com>2007-07-18 15:56:13 +0200
commita6ded48e34f803fcbb42719cee452d1f18938ec7 (patch)
tree6787132e92040a2921f8e8b7d1a66567f1369640 /drivers/mtd
parentUBI: fix debugging stuff (diff)
downloadlinux-a6ded48e34f803fcbb42719cee452d1f18938ec7.tar.xz
linux-a6ded48e34f803fcbb42719cee452d1f18938ec7.zip
UBI: fix message
Increase UBI devices couter after the message, not before. Signed-off-by: Vinit Agnihotri <vinit.agnihotri@gmail.com> Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Diffstat (limited to 'drivers/mtd')
-rw-r--r--drivers/mtd/ubi/build.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/mtd/ubi/build.c b/drivers/mtd/ubi/build.c
index eb8b55dcc3bb..336482a55f84 100644
--- a/drivers/mtd/ubi/build.c
+++ b/drivers/mtd/ubi/build.c
@@ -593,8 +593,6 @@ static int attach_mtd_dev(const char *mtd_dev, int vid_hdr_offset,
if (err)
goto out_detach;
- ubi_devices_cnt += 1;
-
ubi_msg("attached mtd%d to ubi%d", ubi->mtd->index, ubi_devices_cnt);
ubi_msg("MTD device name: \"%s\"", ubi->mtd->name);
ubi_msg("MTD device size: %llu MiB", ubi->flash_size >> 20);
@@ -624,6 +622,7 @@ static int attach_mtd_dev(const char *mtd_dev, int vid_hdr_offset,
wake_up_process(ubi->bgt_thread);
}
+ ubi_devices_cnt += 1;
return 0;
out_detach: