armbian_build/patch/kernel/archive/sunxi-6.2/patches.megous/input-cyttsp4-Fix-probe-oops.patch
The-going 77674a2b76
Sunxi 6.2 (#4883)
* sunxi-6.2: add megous patches

* sunxi-6.2: add series.conf

* sunxi-6.2: add armbian patches

* sunxi-6.2: mfd: sunxi-ac200: fix error initialization

* sunxi-6.2: Extract patches again after rebasing

---------

Co-authored-by: Igor Pečovnik <igor@armbian.com>
2023-03-03 19:09:22 +01:00

30 lines
894 B
Diff

From 8b931908836231b989e5374bf4d9e8a23115cb2e Mon Sep 17 00:00:00 2001
From: Ondrej Jirman <megi@xff.cz>
Date: Fri, 11 Mar 2022 22:01:10 +0100
Subject: [PATCH 084/391] input: cyttsp4: Fix probe oops
__set_bit is called with bit offset -1 which causes oops.
Signed-off-by: Ondrej Jirman <megi@xff.cz>
---
drivers/input/touchscreen/cyttsp4_core.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/input/touchscreen/cyttsp4_core.c b/drivers/input/touchscreen/cyttsp4_core.c
index f3751b3b6..76c2f5d27 100644
--- a/drivers/input/touchscreen/cyttsp4_core.c
+++ b/drivers/input/touchscreen/cyttsp4_core.c
@@ -1907,6 +1907,9 @@ static int cyttsp4_setup_input_device(struct cyttsp4 *cd)
for (i = 0; i < cd->n_signals; i++) {
signal = &cd->signals[i];
+ if (signal->signal < 0)
+ continue;
+
__set_bit(signal->signal, cd->input->absbit);
max = signal->max;
--
2.35.3