Skip to content

Commit

Permalink
Input: cyttsp4 - silence NULL dereference warning
Browse files Browse the repository at this point in the history
If "cd" were NULL then we would dereference it when we print the error
message.  Fortunately enough, it can't ever be NULL so we can remove
those lines.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
  • Loading branch information
Dan Carpenter authored and Dmitry Torokhov committed Jul 3, 2013
1 parent 0fb82ec commit 7c4c018
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions drivers/input/touchscreen/cyttsp4_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -1450,11 +1450,6 @@ static void cyttsp4_watchdog_work(struct work_struct *work)
u8 *mode;
int retval;

if (cd == NULL) {
dev_err(cd->dev, "%s: NULL context pointer\n", __func__);
return;
}

mutex_lock(&cd->system_lock);
retval = cyttsp4_load_status_regs(cd);
if (retval < 0) {
Expand Down

0 comments on commit 7c4c018

Please sign in to comment.