diff options
author | Wei Yongjun <yongjun_wei@trendmicro.com.cn> | 2013-04-24 10:40:00 +0800 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-05-13 17:50:05 -0400 |
commit | d1d2f83f850e7d57a220fa2c7ce7f0bd5ed6c16d (patch) | |
tree | 53958e7ba141179c5623d5316b1a00df641d117a /drivers/staging/cptm1217 | |
parent | 641f064e5df6fb3aaeb6256031a153a5efb16ca6 (diff) |
staging: cptm1217: 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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/cptm1217')
-rw-r--r-- | drivers/staging/cptm1217/clearpad_tm1217.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/staging/cptm1217/clearpad_tm1217.c b/drivers/staging/cptm1217/clearpad_tm1217.c index e96eee3ca89..42a5f5c8d3d 100644 --- a/drivers/staging/cptm1217/clearpad_tm1217.c +++ b/drivers/staging/cptm1217/clearpad_tm1217.c @@ -547,10 +547,8 @@ fail_gpio: fail: /* Clean up before returning failure */ for (i = 0; i < TOUCH_SUPPORTED; i++) { - if (ts->cp_input_info[i].input) { + if (ts->cp_input_info[i].input) input_unregister_device(ts->cp_input_info[i].input); - input_free_device(ts->cp_input_info[i].input); - } } kfree(ts); return retval; |