diff options
author | Oreste Salerno <oreste.salerno@tomtom.com> | 2016-01-27 13:55:20 -0800 |
---|---|---|
committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2016-01-27 14:32:47 -0800 |
commit | 69a124029b4bfcfc66b477ad2c3298f06c905ee6 (patch) | |
tree | 0d6ff736141606d8d24c7681db33b26a6e0bc62e /drivers/input/touchscreen/cyttsp_core.c | |
parent | e4cf92ba44b86d287bdf1ef6a70417b98c441c7b (diff) | |
download | linux-69a124029b4bfcfc66b477ad2c3298f06c905ee6.tar.bz2 |
Input: cyttsp - check return value of input_mt_init_slots
Signed-off-by: Oreste Salerno <oreste.salerno@tomtom.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Diffstat (limited to 'drivers/input/touchscreen/cyttsp_core.c')
-rw-r--r-- | drivers/input/touchscreen/cyttsp_core.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/input/touchscreen/cyttsp_core.c b/drivers/input/touchscreen/cyttsp_core.c index 2d699808b55a..b6653aa06108 100644 --- a/drivers/input/touchscreen/cyttsp_core.c +++ b/drivers/input/touchscreen/cyttsp_core.c @@ -597,7 +597,11 @@ struct cyttsp *cyttsp_probe(const struct cyttsp_bus_ops *bus_ops, input_set_abs_params(input_dev, ABS_MT_TOUCH_MAJOR, 0, CY_MAXZ, 0, 0); - input_mt_init_slots(input_dev, CY_MAX_ID, 0); + error = input_mt_init_slots(input_dev, CY_MAX_ID, 0); + if (error) { + dev_err(dev, "Unable to init MT slots.\n"); + return ERR_PTR(error); + } error = devm_request_threaded_irq(dev, ts->irq, NULL, cyttsp_irq, IRQF_TRIGGER_FALLING | IRQF_ONESHOT, |