mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/xiang/erofs.git
synced 2026-10-28 12:53:14 +01:00
mtd: core: call _get_device() with the master MTD
__get_mtd_device() calls the master's _get_device() callback with mtd,
which may be a partition. __put_mtd_device() passes the master.
This breaks gluebi partitions because gluebi_get_device() uses
container_of() and therefore requires the master MTD. Pass the master
to _get_device(), matching _put_device().
Fixes: 46b5889cc2 ("mtd: implement proper partition handling")
Assisted-by: Codex:gpt-5.6-sol
Signed-off-by: Karl Mehltretter <[email protected]>
Signed-off-by: Miquel Raynal <[email protected]>
This commit is contained in:
1 parent
26300879cd
commit
12b31d1acd
1 file changed
+1
-1
@@ -1333,7 +1333,7 @@ int __get_mtd_device(struct mtd_info *mtd)
|
||||
int err;
|
||||
|
||||
if (master->_get_device) {
|
||||
err = master->_get_device(mtd);
|
||||
err = master->_get_device(master);
|
||||
if (err)
|
||||
return err;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user