diff options
author | Michael Walle | 2023-01-27 10:40:13 +0000 |
---|---|---|
committer | Greg Kroah-Hartman | 2023-02-09 11:28:25 +0100 |
commit | 1dcd68c9cc5c2f7a055dc8c2cbb5a3e4bf268c16 (patch) | |
tree | fe6d3aa350ef1371fc82ac34a500a7799b5fc1cf /LICENSES | |
parent | d78f5d46fc2a43aae0d9509bcbcb495a7c67a54d (diff) |
nvmem: core: fix cell removal on error
commit db3546d58b5a0fa581d9c9f2bdc2856fa6c5e43e upstream.
nvmem_add_cells() could return an error after some cells are already
added to the provider. In this case, the added cells are not removed.
Remove any registered cells if nvmem_add_cells() fails.
Fixes: fa72d847d68d7 ("nvmem: check the return value of nvmem_add_cells()")
Cc: stable@vger.kernel.org
Signed-off-by: Michael Walle <michael@walle.cc>
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Link: https://lore.kernel.org/r/20230127104015.23839-9-srinivas.kandagatla@linaro.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'LICENSES')
0 files changed, 0 insertions, 0 deletions