Skip to contentSkip to conversation

nvmem: release the write-protect pin

PATCH New Khouloud Touil 1 participant 1 message Feb 17, 2020 NVMEM framework

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 nvmem: release the write-protect pin

Implement the auto-release of the write-protect pin that when the registration fails, it's auto-released.

Fixes 2a127da461a9 ("nvmem: add support for the write-protect pin")
Reported-by [email protected]
---
 drivers/nvmem/core.c | 1 +
 1 file changed, 1 insertion(+)
drivers/nvmem/core.c +1 -0
index ef326f243f36..5f1988498d75 100644
@@ -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);
 }
 
Signature · 1 line
2.17.1