mirror of
https://github.com/torvalds/linux.git
synced 2026-11-07 06:17:02 +01:00
mtd: Call get_wunit() on the master partition
The code checks whether master has get_wunit() but still calls
it on the child. Fix this.
Fixes: 46b5889cc2 ("mtd: implement proper partition handling")
Cc: stable@vger.kernel.org
Signed-off-by: Richard Weinberger <richard@nod.at>
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
This commit is contained in:
parent
62ee3da38f
commit
904f18430e
|
|
@ -563,7 +563,7 @@ int mtd_pairing_info_to_wunit(struct mtd_info *mtd,
|
|||
return -EINVAL;
|
||||
|
||||
if (master->pairing && master->pairing->get_wunit)
|
||||
return mtd->pairing->get_wunit(master, info);
|
||||
return master->pairing->get_wunit(master, info);
|
||||
|
||||
return info->pair;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user