Message ID | 20200220100141.5905-5-brgl@bgdev.pl |
---|---|
State | Superseded |
Headers | show |
Series | [v4,1/4] nvmem: fix memory leak in error path | expand |
diff --git a/drivers/nvmem/core.c b/drivers/nvmem/core.c index 071fb897394c..a82375f63d64 100644 --- a/drivers/nvmem/core.c +++ b/drivers/nvmem/core.c @@ -72,6 +72,7 @@ static void nvmem_release(struct device *dev) struct nvmem_device *nvmem = to_nvmem_device(dev); ida_simple_remove(&nvmem_ida, nvmem->id); + gpiod_put(nvmem->wp_gpio); kfree(nvmem); }