Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

UBI: gluebi: initialize ubi_num field

Do not forget to initialize 'gluebi->ubi_num' because otherwise
it will stay 0 even for ubi1 device, and gluebi will open
wrong UBI device when 'gluebi_get_device()' is called.

Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>

+1
+1
drivers/mtd/ubi/gluebi.c
··· 332 332 } 333 333 334 334 gluebi->vol_id = vi->vol_id; 335 + gluebi->ubi_num = vi->ubi_num; 335 336 mtd->type = MTD_UBIVOLUME; 336 337 if (!di->ro_mode) 337 338 mtd->flags = MTD_WRITEABLE;