浏览代码

Input: edt-ft5x06 - remove redundant null check before kfree

kfree on a null pointer is a no-op. Hence null check is not
necessary.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Sachin Kamat 12 年之前
父节点
当前提交
8efcc50323
共有 1 个文件被更改,包括 1 次插入2 次删除
  1. 1 2
      drivers/input/touchscreen/edt-ft5x06.c

+ 1 - 2
drivers/input/touchscreen/edt-ft5x06.c

@@ -440,8 +440,7 @@ static int edt_ft5x06_work_mode(struct edt_ft5x06_ts_data *tsdata)
 		return -EIO;
 	}
 
-	if (tsdata->raw_buffer)
-		kfree(tsdata->raw_buffer);
+	kfree(tsdata->raw_buffer);
 	tsdata->raw_buffer = NULL;
 
 	/* restore parameters */