]> git.itanic.dy.fi Git - linux-stable/commit
mtd: core: fix nvmem error reporting
authorMichael Walle <michael@walle.cc>
Wed, 8 Mar 2023 08:20:19 +0000 (09:20 +0100)
committerMiquel Raynal <miquel.raynal@bootlin.com>
Wed, 8 Mar 2023 13:31:36 +0000 (14:31 +0100)
commit8bd1d24e6ca3c599dd455b0e1b22f77bab8290eb
treea677a591d402147a14feeed8eb7957e2dd6538bf
parent1cd9ceaa5282ff10ea20a7fbadde5a476a1cc99e
mtd: core: fix nvmem error reporting

The master MTD will only have an associated device if
CONFIG_MTD_PARTITIONED_MASTER is set, thus we cannot use dev_err() on
mtd->dev. Instead use the parent device which is the physical flash
memory.

Fixes: 4b361cfa8624 ("mtd: core: add OTP nvmem provider support")
Cc: stable@vger.kernel.org
Signed-off-by: Michael Walle <michael@walle.cc>
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Link: https://lore.kernel.org/linux-mtd/20230308082021.870459-2-michael@walle.cc
drivers/mtd/mtdcore.c