浏览代码

Input: cyttsp4 - silence NULL dereference warning

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>
Dan Carpenter 12 年之前
父节点
当前提交
7c4c018aad
共有 1 个文件被更改,包括 0 次插入5 次删除
  1. 0 5
      drivers/input/touchscreen/cyttsp4_core.c

+ 0 - 5
drivers/input/touchscreen/cyttsp4_core.c

@@ -1450,11 +1450,6 @@ static void cyttsp4_watchdog_work(struct work_struct *work)
 	u8 *mode;
 	u8 *mode;
 	int retval;
 	int retval;
 
 
-	if (cd == NULL) {
-		dev_err(cd->dev, "%s: NULL context pointer\n", __func__);
-		return;
-	}
-
 	mutex_lock(&cd->system_lock);
 	mutex_lock(&cd->system_lock);
 	retval = cyttsp4_load_status_regs(cd);
 	retval = cyttsp4_load_status_regs(cd);
 	if (retval < 0) {
 	if (retval < 0) {