]> git.itanic.dy.fi Git - linux-stable/commit
nvmem: core: drop the removal of the cells in nvmem_add_cells()
authorMichael Walle <michael@walle.cc>
Mon, 6 Feb 2023 13:43:48 +0000 (13:43 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 6 Feb 2023 18:06:59 +0000 (19:06 +0100)
commitcc5bdd323dde6494623f3ffe3a5b887fa21cd375
treecb2a19c18bcdf305e529b07a31b55555c8d9bd48
parentfbd03d27776c6121a483921601418e3c8f0ff37e
nvmem: core: drop the removal of the cells in nvmem_add_cells()

If nvmem_add_cells() fails, the whole nvmem_register() will fail
and the cells will then be removed anyway. This is a preparation
to introduce a nvmem_add_one_cell() which can then be used by
nvmem_add_cells().

This is then the same to what nvmem_add_cells_from_table() and
nvmem_add_cells_from_of() do.

Signed-off-by: Michael Walle <michael@walle.cc>
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Link: https://lore.kernel.org/r/20230206134356.839737-15-srinivas.kandagatla@linaro.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/nvmem/core.c