Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
nvmem: fix memory leak in error path
We need to free the ida mapping and nvmem struct if the write-protect GPIO lookup fails. Fixes: 2a127da ("nvmem: add support for the write-protect pin") Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com> Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Link: https://lore.kernel.org/r/20200310132257.23358-7-srinivas.kandagatla@linaro.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
- Loading branch information