提交 79fbf046 编写于 作者: A Andrey Smirnov 提交者: 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: NAndrey Smirnov <andrew.smirnov@gmail.com>
Signed-off-by: NSrinivas Kandagatla <srinivas.kandagatla@linaro.org>
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
上级 3360acdf
...@@ -532,6 +532,7 @@ int nvmem_unregister(struct nvmem_device *nvmem) ...@@ -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;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册