UBI: Fastmap: Calc fastmap size correctly
[sfrench/cifs-2.6.git] / drivers / mtd / ubi / vtbl.c
index d77b1c1d7c7267c3186635497eeba492f539d735..07cac5f9ffb801f4d3acc8c2c5638d9617638097 100644 (file)
@@ -591,7 +591,7 @@ static int init_volumes(struct ubi_device *ubi,
 
                /* Static volumes only */
                av = ubi_find_av(ai, i);
-               if (!av) {
+               if (!av || !av->leb_count) {
                        /*
                         * No eraseblocks belonging to this volume found. We
                         * don't actually know whether this static volume is