Skip to content

Commit

Permalink
Input: cyttsp - remove useless checks in cyttsp_probe()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Dmitry Torokhov committed Mar 4, 2012
1 parent aa87512 commit aaa60fa
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/input/touchscreen/cyttsp_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit aaa60fa

Please sign in to comment.