Skip to content

Commit

Permalink
Input: edt-ft5x06 - remove redundant null check before kfree
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Sachin Kamat authored and Dmitry Torokhov committed Mar 31, 2013
1 parent 84c0c9f commit 8efcc50
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions drivers/input/touchscreen/edt-ft5x06.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down

0 comments on commit 8efcc50

Please sign in to comment.