twx-linux/drivers/input
Colin Ian King 6cdc1ef84e Input: resistive-adc-touch - fix uninitialized variable 'press'
In the case where st->ch_map[GRTS_CH_PRESSURE] < GRTS_MAX_CHANNELS is false
and also st->ch_map[GRTS_CH_Z1] < GRTS_MAX_CHANNELS is false the variable
press is not initialized and contains garbage. In this situation
st->pressure is also false, so we do not actually use press value, but
it is impossible for the compiler to realize this, and it emits
"uninitialized variable" warning. Fix this by initializing press
to 0 and allows us to also remove an else clause that sets press to 0.

Addresses-Coverity: ("Uninitialized scalar variable")
Fixes: 60b7db914ddd ("Input: resistive-adc-touch - rework mapping of channels")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Link: https://lore.kernel.org/r/20210603220809.155118-1-colin.king@canonical.com
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2021-06-05 16:41:08 -07:00
..
gameport
joystick Input: n64joy - fix return value check in n64joy_probe() 2021-03-09 21:41:28 -08:00
keyboard Linux 5.12 2021-05-25 11:24:42 -07:00
misc Input: pm8941-pwrkey - add support for PMK8350 PON_HLOS PMIC peripheral 2021-06-01 21:35:27 -07:00
mouse Input: elan_i2c - fix a typo in parameter name 2021-03-25 15:28:18 -07:00
rmi4 Input: synaptics-rmi4 - use new structure for SPI transfer delays 2020-12-10 23:39:16 -08:00
serio Linux 5.12 2021-05-25 11:24:42 -07:00
tablet Input: aiptek - convert sysfs sprintf/snprintf family to sysfs_emit 2021-02-22 21:22:50 -08:00
touchscreen Input: resistive-adc-touch - fix uninitialized variable 'press' 2021-06-05 16:41:08 -07:00
apm-power.c
evbug.c Input: evbug - remove an empty comment block 2021-05-24 21:06:39 -07:00
evdev.c
ff-core.c
ff-memless.c
input-compat.c
input-compat.h
input-leds.c
input-mt.c
input-poller.c
input-poller.h
input.c
joydev.c module: remove never implemented MODULE_SUPPORTED_DEVICE 2021-03-17 13:16:18 -07:00
Kconfig
Makefile Input: touchscreen - move helper functions to core 2021-03-25 11:14:09 -07:00
matrix-keymap.c
mousedev.c
sparse-keymap.c
touchscreen.c Input: touchscreen - broaden use-cases described in comments 2021-03-25 11:14:09 -07:00