Skip to content

Commit 6244559

Browse files
committed
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>
1 parent a9d59c2 commit 6244559

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

drivers/input/touchscreen/zforce_ts.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -826,7 +826,11 @@ static int zforce_probe(struct i2c_client *client)
826826
input_set_abs_params(input_dev, ABS_MT_TOUCH_MINOR, 0,
827827
ZFORCE_MAX_AREA, 0, 0);
828828
input_set_abs_params(input_dev, ABS_MT_ORIENTATION, 0, 1, 0, 0);
829-
input_mt_init_slots(input_dev, ZFORCE_REPORT_POINTS, INPUT_MT_DIRECT);
829+
830+
ret = input_mt_init_slots(input_dev, ZFORCE_REPORT_POINTS,
831+
INPUT_MT_DIRECT);
832+
if (ret)
833+
return ret;
830834

831835
input_set_drvdata(ts->input, ts);
832836

0 commit comments

Comments
 (0)