diff options
author | Andrey Smirnov <andrew.smirnov@gmail.com> | 2017-06-09 12:59:08 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2017-06-09 13:08:27 +0300 |
commit | 79fbf0468b2a05a743d31794423925d229c0e9c2 (patch) | |
tree | 86b540cf1181e95a0ccca2dae327e23592a0656d /drivers/nvmem | |
parent | 3360acdf839170b612f5b212539694c20e3f16d0 (diff) | |
download | linux-79fbf0468b2a05a743d31794423925d229c0e9c2.tar.xz |
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>
Diffstat (limited to 'drivers/nvmem')
-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) nvmem_device_remove_all_cells(nvmem); device_del(&nvmem->dev); + put_device(&nvmem->dev); return 0; } |