Procházet zdrojové kódy

Input: cyttsp - remove useless checks in cyttsp_probe()

This fixes reference-before-check problem; there is no reason to check
if caller passed NULL dev or bus_ops as it is done only by bus-specific
drivers which already do the right thing.

Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Dmitry Torokhov před 14 roky
rodič
revize
aaa60fa7ac
1 změnil soubory, kde provedl 1 přidání a 1 odebrání
  1. 1 1
      drivers/input/touchscreen/cyttsp_core.c

+ 1 - 1
drivers/input/touchscreen/cyttsp_core.c

@@ -523,7 +523,7 @@ struct cyttsp *cyttsp_probe(const struct cyttsp_bus_ops *bus_ops,
 	struct input_dev *input_dev;
 	struct input_dev *input_dev;
 	int error;
 	int error;
 
 
-	if (!dev || !bus_ops || !pdata || !pdata->name || irq <= 0) {
+	if (!pdata || !pdata->name || irq <= 0) {
 		error = -EINVAL;
 		error = -EINVAL;
 		goto err_out;
 		goto err_out;
 	}
 	}