mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-26 10:49:33 +00:00
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>
This commit is contained in:
parent
6847e154e3
commit
c8cc452501
1 changed files with 1 additions and 0 deletions
|
@ -332,6 +332,7 @@ static int gluebi_create(struct ubi_device_info *di,
|
|||
}
|
||||
|
||||
gluebi->vol_id = vi->vol_id;
|
||||
gluebi->ubi_num = vi->ubi_num;
|
||||
mtd->type = MTD_UBIVOLUME;
|
||||
if (!di->ro_mode)
|
||||
mtd->flags = MTD_WRITEABLE;
|
||||
|
|
Loading…
Reference in a new issue