diff options
author | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2012-03-04 12:26:15 -0500 |
---|---|---|
committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2012-03-04 13:49:27 -0500 |
commit | aaa60fa7ac66ede814f7ad37a2b3a07b4f784756 (patch) | |
tree | 625eb8a9d94fd29460170698bb273ff4ef97e7eb /drivers/input/touchscreen/cyttsp_core.c | |
parent | aa87512fbc56e107c14f7fa85823eb7e82a2f64c (diff) |
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>
Diffstat (limited to 'drivers/input/touchscreen/cyttsp_core.c')
-rw-r--r-- | drivers/input/touchscreen/cyttsp_core.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/input/touchscreen/cyttsp_core.c b/drivers/input/touchscreen/cyttsp_core.c index 8be22479b41..f030d9ec795 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, | |||
523 | struct input_dev *input_dev; | 523 | struct input_dev *input_dev; |
524 | int error; | 524 | int error; |
525 | 525 | ||
526 | if (!dev || !bus_ops || !pdata || !pdata->name || irq <= 0) { | 526 | if (!pdata || !pdata->name || irq <= 0) { |
527 | error = -EINVAL; | 527 | error = -EINVAL; |
528 | goto err_out; | 528 | goto err_out; |
529 | } | 529 | } |