Skip to content
Commit b9c0ebb8 authored by Takashi Iwai's avatar Takashi Iwai Committed by Dmitry Torokhov
Browse files

Input: elants_i2c - fix NULL dereference at probing

The recent change in elants_i2c driver to support more chips
introduced a regression leading to Oops at probing.  The driver reads
id->driver_data, but the id may be NULL depending on the device type
the driver gets bound.

Replace the driver data extraction with the device_get_match_data()
helper, and define the driver data in OF table, too.

Fixes: 9517b95b ("Input: elants_i2c - add support for eKTF3624")
BugLink: https://bugzilla.suse.com/show_bug.cgi?id=1186454


Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20210528071024.26450-1-tiwai@suse.de


Signed-off-by: default avatarDmitry Torokhov <dmitry.torokhov@gmail.com>
parent 0b1d6c8c
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment