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>
This commit is contained in:
Andrey Smirnov 2017-06-09 10:59:08 +01:00 committed by Greg Kroah-Hartman
parent 3360acdf83
commit 79fbf0468b
1 changed files with 1 additions and 0 deletions

View File

@ -532,6 +532,7 @@ int nvmem_unregister(struct nvmem_device *nvmem)
nvmem_device_remove_all_cells(nvmem); nvmem_device_remove_all_cells(nvmem);
device_del(&nvmem->dev); device_del(&nvmem->dev);
put_device(&nvmem->dev);
return 0; return 0;
} }