Re: [PATCH 3/4] mtd: core: fix error path for nvmem provider

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, 2023-03-06 at 12:58:04 UTC, Michael Walle wrote:
> 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@xxxxxxxxxxxxxxx
> Signed-off-by: Michael Walle <michael@xxxxxxxx>

Applied to https://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux.git mtd/next, thanks.

Miquel



[Index of Archives]     [Linux Kernel]     [Kernel Development Newbies]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux