svn commit: r328191 - head/sys/dev/atkbdc
Jean-Sébastien Pédron
dumbbell at FreeBSD.org
Sat Jan 20 11:21:24 UTC 2018
Author: dumbbell
Date: Sat Jan 20 11:21:22 2018
New Revision: 328191
URL: https://svnweb.freebsd.org/changeset/base/328191
Log:
psm: Don't try to detect trackpoint packets if the Elantech device has none
This fixes a panic when `EVDEV_SUPPORT` is enabled: if a trackpoint
packet was detected but there was no trackpoint, we still tried to emit an
evdev event even though the associated relative evdev device (`evdev_r`)
was not initialized.
PR: 225339
MFC after: 1 week
Modified:
head/sys/dev/atkbdc/psm.c
Modified: head/sys/dev/atkbdc/psm.c
==============================================================================
--- head/sys/dev/atkbdc/psm.c Sat Jan 20 11:02:18 2018 (r328190)
+++ head/sys/dev/atkbdc/psm.c Sat Jan 20 11:21:22 2018 (r328191)
@@ -4187,7 +4187,7 @@ proc_elantech(struct psm_softc *sc, packetbuf_t *pb, m
/* Determine packet format and do a sanity check for out of sync packets. */
if (ELANTECH_PKT_IS_DEBOUNCE(pb, sc->elanhw.hwversion))
pkt = ELANTECH_PKT_NOP;
- else if (ELANTECH_PKT_IS_TRACKPOINT(pb))
+ else if (sc->elanhw.hastrackpoint && ELANTECH_PKT_IS_TRACKPOINT(pb))
pkt = ELANTECH_PKT_TRACKPOINT;
else
switch (sc->elanhw.hwversion) {
More information about the svn-src-all
mailing list