Skip to contentSkip to conversation

mtd: Call get_wunit() on the master partition

PATCH Applied Richard Weinberger (sigma star gmbh) 3 participants 4 messages Sep 17 – Sep 25 Memory technology devices (MTD)

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 mtd: Call get_wunit() on the master partition

From: Richard Weinberger <[email protected]>

The code checks whether master has get_wunit() but still calls it on the child. Fix this.

Fixes 46b5889cc2c5 ("mtd: implement proper partition handling")
---
 drivers/mtd/mtdcore.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/mtd/mtdcore.c +1 -1
index 16629382a787..82b1e6392b16 100644
@@ -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;
 }
Signature · 1 line
2.55.0
maintainer
#1 lore raw
Quoted 4 lines · Richard Weinberger (sigma star gmbh)

From: Richard Weinberger <[email protected]>

The code checks whether master has get_wunit() but still calls it on the child. Fix this.

Ha :-)

Shouldn't we add Cc: stable?

Quoted 2 lines
Fixes 46b5889cc2c5 ("mtd: implement proper partition handling")

Otherwise lgtm!

Miquèl

#2 lore raw

Am Thu, Sep 17, 2026, 17:14 schrieb Miquel Raynal <[email protected]>:

Quoted 10 lines · Richard Weinberger (sigma star gmbh)
Quoted 5 lines

From: Richard Weinberger <[email protected]>

The code checks whether master has get_wunit() but still calls it on the child. Fix this.

Ha :-)

Shouldn't we add Cc: stable?

Fine by me.

Thanks,
//richard

______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

maintainer Applied
#3 lore raw
In reply to Richard Weinberger (sigma star gmbh)
Quoted 4 lines · Richard Weinberger (sigma star gmbh)

The code checks whether master has get_wunit() but still calls it on the child. Fix this.

Applied to mtd/next, thanks!

[1/1] mtd: Call get_wunit() on the master partition

      commit: 904f18430e8cce829cb9130eab7a93020e33fc89

Patche(s) should be available on mtd/linux.git and will be part of the next PR (provided that no robot complains by then).

Kind regards,
Miquèl