UBI: init_volumes: Ignore volumes with no LEBs
UBI assumes that ubi_attach_info will only contain ubi_ainf_volume
structures for volumes with at least one LEB.
In scanning mode this is true because UBI can nicely create a ubi_ainf_volume
on demand while creating the EBA table.

For fastmap this is not true, the fastmap on-flash structure has a list of
all volumes, the ubi_ainf_volume structures are created from this list.
So it can happen that an empty volume ends up in init_volumes().

We can easely deal with that by looking into ->leb_count too.

Signed-off-by: Richard Weinberger <richard@nod.at>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
1 parent 305b1bb commit 315804827234d5f1b1ea3ce23bcd04b1ca36c072
@Richard Weinberger Richard Weinberger authored on 8 Jul 2014
Sascha Hauer committed on 11 Sep 2014
Showing 1 changed file
View
drivers/mtd/ubi/vtbl.c