Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

+1 -1
+1 -1
drivers/input/touchscreen/cyttsp_core.c
··· 523 523 struct input_dev *input_dev; 524 524 int error; 525 525 526 - if (!dev || !bus_ops || !pdata || !pdata->name || irq <= 0) { 526 + if (!pdata || !pdata->name || irq <= 0) { 527 527 error = -EINVAL; 528 528 goto err_out; 529 529 }