svn commit: r328482 - stable/11/sys/dev/atkbdc
Jean-Sébastien Pédron
dumbbell at FreeBSD.org
Sat Jan 27 16:48:30 UTC 2018
Author: dumbbell
Date: Sat Jan 27 16:48:29 2018
New Revision: 328482
URL: https://svnweb.freebsd.org/changeset/base/328482
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 of: r328191
Modified:
stable/11/sys/dev/atkbdc/psm.c
Directory Properties:
stable/11/ (props changed)
Modified: stable/11/sys/dev/atkbdc/psm.c
==============================================================================
--- stable/11/sys/dev/atkbdc/psm.c Sat Jan 27 16:36:06 2018 (r328481)
+++ stable/11/sys/dev/atkbdc/psm.c Sat Jan 27 16:48:29 2018 (r328482)
@@ -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-stable
mailing list