Input: cyttsp4 - silence NULL dereference warning
authorDan Carpenter <dan.carpenter@oracle.com>
Wed, 3 Jul 2013 03:32:53 +0000 (20:32 -0700)
committerDmitry Torokhov <dmitry.torokhov@gmail.com>
Wed, 3 Jul 2013 03:39:20 +0000 (20:39 -0700)
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>
drivers/input/touchscreen/cyttsp4_core.c

index 7aa4a349a07ef86f8051970604ed94713c474f98..851e3ff80437fd43ba3120827ca3c5f4826167ad 100644 (file)
@@ -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) {