提交 a1a26e49 编写于 作者: D Dan Carpenter 提交者: Greg Kroah-Hartman

Staging: cptm1217: move free under dereference

We dereference "ts" in the printk so move the kfree() down a line.
Signed-off-by: NDan Carpenter <error27@gmail.com>
Acked-by: NAlan Cox <alan@linux.intel.com>
Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
上级 62af33ec
...@@ -460,9 +460,9 @@ static int cp_tm1217_probe(struct i2c_client *client, ...@@ -460,9 +460,9 @@ static int cp_tm1217_probe(struct i2c_client *client,
for (i = 0; i < TOUCH_SUPPORTED; i++) { for (i = 0; i < TOUCH_SUPPORTED; i++) {
input_dev = input_allocate_device(); input_dev = input_allocate_device();
if (input_dev == NULL) { if (input_dev == NULL) {
kfree(ts);
dev_err(ts->dev, dev_err(ts->dev,
"cp_tm1217:Input Device Struct alloc failed\n"); "cp_tm1217:Input Device Struct alloc failed\n");
kfree(ts);
return -ENOMEM; return -ENOMEM;
} }
input_info = &ts->cp_input_info[i]; input_info = &ts->cp_input_info[i];
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册