From aaa60fa7ac66ede814f7ad37a2b3a07b4f784756 Mon Sep 17 00:00:00 2001 From: Dmitry Torokhov Date: Sun, 4 Mar 2012 09:26:15 -0800 Subject: [PATCH] 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 Signed-off-by: Dmitry Torokhov --- drivers/input/touchscreen/cyttsp_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/input/touchscreen/cyttsp_core.c b/drivers/input/touchscreen/cyttsp_core.c index 8be2247..f030d9e 100644 --- a/drivers/input/touchscreen/cyttsp_core.c +++ b/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; int error; - if (!dev || !bus_ops || !pdata || !pdata->name || irq <= 0) { + if (!pdata || !pdata->name || irq <= 0) { error = -EINVAL; goto err_out; } -- 2.7.4