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

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>

authored by

Oreste Salerno and committed by
Dmitry Torokhov
69a12402 e4cf92ba

+5 -1
+5 -1
drivers/input/touchscreen/cyttsp_core.c
··· 597 597 input_set_abs_params(input_dev, ABS_MT_TOUCH_MAJOR, 598 598 0, CY_MAXZ, 0, 0); 599 599 600 - input_mt_init_slots(input_dev, CY_MAX_ID, 0); 600 + error = input_mt_init_slots(input_dev, CY_MAX_ID, 0); 601 + if (error) { 602 + dev_err(dev, "Unable to init MT slots.\n"); 603 + return ERR_PTR(error); 604 + } 601 605 602 606 error = devm_request_threaded_irq(dev, ts->irq, NULL, cyttsp_irq, 603 607 IRQF_TRIGGER_FALLING | IRQF_ONESHOT,