summaryrefslogtreecommitdiffstats
path: root/drivers/input/touchscreen
diff options
context:
space:
mode:
authorDmitry Torokhov <dmitry.torokhov@gmail.com>2024-08-24 07:50:29 +0200
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2024-09-06 07:56:45 +0200
commit624455941015c199ac317c8cf976ac6b02cfdec1 (patch)
tree1bbf8adfae0cc0351864975c4604904e69075950 /drivers/input/touchscreen
parentInput: zforce_ts - do not explicitly set EV_SYN, etc bits (diff)
downloadlinux-624455941015c199ac317c8cf976ac6b02cfdec1.tar.xz
linux-624455941015c199ac317c8cf976ac6b02cfdec1.zip
Input: zforce_ts - handle errors from input_mt_init_sots()
input_mt_init_slots() can potentially return error which needs to be handled. Tested-by: Andreas Kemnade <andreas@kemnade.info> # Tolino Shine2HD Link: https://lore.kernel.org/r/20240824055047.1706392-6-dmitry.torokhov@gmail.com Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Diffstat (limited to 'drivers/input/touchscreen')
-rw-r--r--drivers/input/touchscreen/zforce_ts.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/input/touchscreen/zforce_ts.c b/drivers/input/touchscreen/zforce_ts.c
index a6f6cc5d8a3f..a4956f1eebb2 100644
--- a/drivers/input/touchscreen/zforce_ts.c
+++ b/drivers/input/touchscreen/zforce_ts.c
@@ -826,7 +826,11 @@ static int zforce_probe(struct i2c_client *client)
input_set_abs_params(input_dev, ABS_MT_TOUCH_MINOR, 0,
ZFORCE_MAX_AREA, 0, 0);
input_set_abs_params(input_dev, ABS_MT_ORIENTATION, 0, 1, 0, 0);
- input_mt_init_slots(input_dev, ZFORCE_REPORT_POINTS, INPUT_MT_DIRECT);
+
+ ret = input_mt_init_slots(input_dev, ZFORCE_REPORT_POINTS,
+ INPUT_MT_DIRECT);
+ if (ret)
+ return ret;
input_set_drvdata(ts->input, ts);