* [PATCH] nvmem: release the write-protect pin
@ 2020-02-17 13:52 Khouloud Touil
0 siblings, 0 replies; only message in thread
From: Khouloud Touil @ 2020-02-17 13:52 UTC (permalink / raw)
To: srinivas.kandagatla, bgolaszewski
Cc: linus.walleij, linux-kernel, geert, baylibre-upstreaming, Khouloud Touil
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: geert@linux-m68k.org
Signed-off-by: Khouloud Touil <ktouil@baylibre.com>
---
drivers/nvmem/core.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/nvmem/core.c b/drivers/nvmem/core.c
index ef326f243f36..5f1988498d75 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);
}
--
2.17.1
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2020-02-17 13:53 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-02-17 13:52 [PATCH] nvmem: release the write-protect pin Khouloud Touil
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).