diff options
author | Michael Walle <michael@walle.cc> | 2023-03-08 11:20:20 +0300 |
---|---|---|
committer | Miquel Raynal <miquel.raynal@bootlin.com> | 2023-03-08 16:31:42 +0300 |
commit | e0489f6e221f5ddee6cb3bd51b992b790c5fa4b9 (patch) | |
tree | 157a23ef4558510475ea3ebca03367d84431cfcc /tools/perf/scripts/python/exported-sql-viewer.py | |
parent | 8bd1d24e6ca3c599dd455b0e1b22f77bab8290eb (diff) | |
download | linux-e0489f6e221f5ddee6cb3bd51b992b790c5fa4b9.tar.xz |
mtd: core: fix error path for nvmem provider
If mtd_otp_nvmem_add() fails, the partitions won't be removed
because there is simply no call to del_mtd_partitions().
Unfortunately, add_mtd_partitions() will print all partitions to
the kernel console. If mtd_otp_nvmem_add() returns -EPROBE_DEFER
this would print the partitions multiple times to the kernel
console. Instead move mtd_otp_nvmem_add() to the beginning of the
function.
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-3-michael@walle.cc
Diffstat (limited to 'tools/perf/scripts/python/exported-sql-viewer.py')
0 files changed, 0 insertions, 0 deletions