From: Vinit Agnihotri Date: Wed, 4 Jul 2007 13:35:56 +0000 (+0300) Subject: UBI: fix message X-Git-Tag: v2.6.23-rc1~495^2~10 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a6ded48e34f803fcbb42719cee452d1f18938ec7;p=linux-2.6 UBI: fix message Increase UBI devices couter after the message, not before. Signed-off-by: Vinit Agnihotri Signed-off-by: Artem Bityutskiy --- diff --git a/drivers/mtd/ubi/build.c b/drivers/mtd/ubi/build.c index eb8b55dcc3..336482a55f 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: