Commit 79fbf046 authored by Andrey Smirnov's avatar Andrey Smirnov Committed by Greg Kroah-Hartman

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: default avatarAndrey Smirnov <andrew.smirnov@gmail.com>
Signed-off-by: default avatarSrinivas Kandagatla <srinivas.kandagatla@linaro.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 3360acdf
......@@ -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;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment