Skip to content

Commit

Permalink
UBI: fix message
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Vinit Agnihotri authored and Artem Bityutskiy committed Jul 18, 2007
1 parent b89044b commit a6ded48
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions drivers/mtd/ubi/build.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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:
Expand Down

0 comments on commit a6ded48

Please sign in to comment.