Input: psmouse - fix cleaning up SMBus companions
authorDmitry Torokhov <dmitry.torokhov@gmail.com>
Sat, 1 Apr 2017 18:33:11 +0000 (11:33 -0700)
committerDmitry Torokhov <dmitry.torokhov@gmail.com>
Mon, 3 Apr 2017 18:59:56 +0000 (11:59 -0700)
commitf6f08c55cced6885f1e1448cd0806098e836c5f5
tree8e35aef6c163b43919fc52f6b57e3905f91100a7
parentf069b5a0b27ad4a87e9351e54fbcab3d3f8a9fd5
Input: psmouse - fix cleaning up SMBus companions

When trying to destroy platform data after destruction of SMbus companion,
we need to make sure that we are actually dealing with an SMB companion
device, and not some random I2C client device.

Fixes: 8eb92e5c9133 ("Input: psmouse - add support for SMBus companions")
Reported-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Tested-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
drivers/input/mouse/psmouse-smbus.c