Commit a1a26e49 authored by Dan Carpenter's avatar Dan Carpenter Committed by Greg Kroah-Hartman
Browse files

Staging: cptm1217: move free under dereference



We dereference "ts" in the printk so move the kfree() down a line.

Signed-off-by: default avatarDan Carpenter <error27@gmail.com>
Acked-by: default avatarAlan Cox <alan@linux.intel.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 62af33ec
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -460,9 +460,9 @@ static int cp_tm1217_probe(struct i2c_client *client,
	for (i = 0; i < TOUCH_SUPPORTED; i++) {
		input_dev = input_allocate_device();
		if (input_dev == NULL) {
			kfree(ts);
			dev_err(ts->dev,
				"cp_tm1217:Input Device Struct alloc failed\n");
			kfree(ts);
			return -ENOMEM;
		}
		input_info = &ts->cp_input_info[i];