Input: edt-ft5x06 - remove redundant null check before kfree
authorSachin Kamat <sachin.kamat@linaro.org>
Thu, 28 Mar 2013 08:14:42 +0000 (01:14 -0700)
committerDmitry Torokhov <dmitry.torokhov@gmail.com>
Sun, 31 Mar 2013 07:21:34 +0000 (00:21 -0700)
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>
drivers/input/touchscreen/edt-ft5x06.c

index a917015..83fa1b1 100644 (file)
@@ -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 */