From e84d2834a26c91464dd13048eba20cabbee409b2 Mon Sep 17 00:00:00 2001 From: rbandi Date: Mon, 7 Dec 2020 07:50:42 -0800 Subject: [PATCH] HID: qvr: Remove device pointer on disconnect Make local device pointer NULL when .remove is invoked. Change-Id: I5bf91367b633abf79cbc60ef5bdf93cca955902c Signed-off-by: rbandi --- drivers/hid/hid-qvr.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/hid/hid-qvr.c b/drivers/hid/hid-qvr.c index 19d2b9899cae..46a1f92f92a1 100644 --- a/drivers/hid/hid-qvr.c +++ b/drivers/hid/hid-qvr.c @@ -632,6 +632,9 @@ static int qvr_external_sensor_raw_event(struct hid_device *hid, static void qvr_external_sensor_device_remove(struct hid_device *hdev) { + struct qvr_external_sensor *sensor = &qvr_external_sensor; + + sensor->device = NULL; hid_hw_stop(hdev); }