提交 5fc4e6e1 编写于 作者: D Dmitry Torokhov

Input: ibmasm - fix input initialization error path

Do not try to free device that has already been unregistered,
input_unregister_device() frees it automatically.

Spotted by Vernon Mauery <vernux@us.ibm.com>
Signed-off-by: NDmitry Torokhov <dtor@mail.ru>
上级 94f8d28c
...@@ -270,6 +270,7 @@ int ibmasm_init_remote_input_dev(struct service_processor *sp) ...@@ -270,6 +270,7 @@ int ibmasm_init_remote_input_dev(struct service_processor *sp)
err_unregister_mouse_dev: err_unregister_mouse_dev:
input_unregister_device(mouse_dev); input_unregister_device(mouse_dev);
mouse_dev = NULL; /* so we don't try to free it again below */
err_free_devices: err_free_devices:
input_free_device(mouse_dev); input_free_device(mouse_dev);
input_free_device(keybd_dev); input_free_device(keybd_dev);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册