aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/kernel/hid-lg-g710-plus.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/kernel/hid-lg-g710-plus.c b/src/kernel/hid-lg-g710-plus.c
index 42ff7d8..57876d8 100644
--- a/src/kernel/hid-lg-g710-plus.c
+++ b/src/kernel/hid-lg-g710-plus.c
@@ -249,6 +249,11 @@ err_free:
static void lg_g710_plus_remove(struct hid_device *hdev)
{
struct lg_g710_plus_data* data = lg_g710_plus_get_data(hdev);
+ struct list_head *feature_report_list = &hdev->report_enum[HID_FEATURE_REPORT].report_list;
+
+ if (data != NULL && !list_empty(feature_report_list))
+ sysfs_remove_group(&hdev->dev.kobj, &data->attr_group);
+
hid_hw_stop(hdev);
if (data != NULL) {
kfree(data);