x86/olpc/xo1/sci: Don't call input_free_device() after input_unregister_device()
authorWei Yongjun <yongjun_wei@trendmicro.com.cn>
Wed, 24 Apr 2013 02:46:24 +0000 (10:46 +0800)
committerIngo Molnar <mingo@kernel.org>
Wed, 24 Apr 2013 06:44:47 +0000 (08:44 +0200)
commit3482e664dc7f44e0ffb1fcf1de7af74977748f31
tree75a1453f240ffc5eb9b96ee583ff82e4e36e8ce9
parentad0304cfd90f46bfcae3a6cd2b69067741541730
x86/olpc/xo1/sci: Don't call input_free_device() after input_unregister_device()

input_free_device() should only be used if
input_register_device() was not called yet or if it failed. Once
device was unregistered use input_unregister_device() and memory
will be freed once last reference to the device is dropped.

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Cc: dsd@laptop.org
Cc: pgf@laptop.org
Cc: gregkh@linuxfoundation.org
Link: http://lkml.kernel.org/r/CAPgLHd84cboeucog%2BYNdHvGqTfTROujDKZgSkh3o0B-Q93ee2A@mail.gmail.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
arch/x86/platform/olpc/olpc-xo1-sci.c