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:
Richard Weinberger 2026-09-17 16:53:29 +02:00 committed by Miquel Raynal
parent 62ee3da38f
commit 904f18430e

View File

@ -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;
}