diff options
author | Andrey Smirnov <andrew.smirnov@gmail.com> | 2017-06-09 05:59:08 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2017-06-09 06:08:27 -0400 |
commit | 79fbf0468b2a05a743d31794423925d229c0e9c2 (patch) | |
tree | 86b540cf1181e95a0ccca2dae327e23592a0656d | |
parent | 3360acdf839170b612f5b212539694c20e3f16d0 (diff) |
nvmem: core: Call put_device() in nvmem_unregister()
Call put_device() in nvmem_unregister() to make sure nvmem_release
gets called freeing up allocated resources.
Cc: cphealy@gmail.com
Cc: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Cc: Maxime Ripard <maxime.ripard@free-electrons.com>
Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r-- | drivers/nvmem/core.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/nvmem/core.c b/drivers/nvmem/core.c index 6cf916d9db6d..0cbac71195b5 100644 --- a/drivers/nvmem/core.c +++ b/drivers/nvmem/core.c | |||
@@ -532,6 +532,7 @@ int nvmem_unregister(struct nvmem_device *nvmem) | |||
532 | 532 | ||
533 | nvmem_device_remove_all_cells(nvmem); | 533 | nvmem_device_remove_all_cells(nvmem); |
534 | device_del(&nvmem->dev); | 534 | device_del(&nvmem->dev); |
535 | put_device(&nvmem->dev); | ||
535 | 536 | ||
536 | return 0; | 537 | return 0; |
537 | } | 538 | } |