Skip to content

Commit 6d12075

Browse files
committed
Merge tag 'mtd/fixes-for-5.8-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux
Pull MTD fixes from Miquel Raynal: "MTD: - Set a missing master partition panic write flag Raw NAND: - Fix build issue in the xway driver - Fix a wrong return code" * tag 'mtd/fixes-for-5.8-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux: mtd: rawnand: xway: Fix build issue mtd: set master partition panic write flag nandsim: Fix return code testing of ns_find_operation()
2 parents aa27b32 + 880bc52 commit 6d12075

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

drivers/mtd/mtdcore.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1273,8 +1273,8 @@ int mtd_panic_write(struct mtd_info *mtd, loff_t to, size_t len, size_t *retlen,
12731273
return -EROFS;
12741274
if (!len)
12751275
return 0;
1276-
if (!mtd->oops_panic_write)
1277-
mtd->oops_panic_write = true;
1276+
if (!master->oops_panic_write)
1277+
master->oops_panic_write = true;
12781278

12791279
return master->_panic_write(master, mtd_get_master_ofs(mtd, to), len,
12801280
retlen, buf);

drivers/mtd/nand/raw/nandsim.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1761,7 +1761,7 @@ static void ns_switch_state(struct nandsim *ns)
17611761

17621762
NS_DBG("switch_state: operation is unknown, try to find it\n");
17631763

1764-
if (!ns_find_operation(ns, 0))
1764+
if (ns_find_operation(ns, 0))
17651765
return;
17661766

17671767
if ((ns->state & ACTION_MASK) &&

drivers/mtd/nand/raw/xway_nand.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,7 @@ static int xway_nand_remove(struct platform_device *pdev)
224224
struct nand_chip *chip = &data->chip;
225225
int ret;
226226

227-
ret = mtd_device_unregister(mtd);
227+
ret = mtd_device_unregister(nand_to_mtd(chip));
228228
WARN_ON(ret);
229229
nand_cleanup(chip);
230230

0 commit comments

Comments
 (0)