Skip to content

Commit

Permalink
HID: multitouch: warn on sysfs group creation failure
Browse files Browse the repository at this point in the history
This adds a warning message stating that the sysfs group was not able to be
created for the passed hid_device structure pointer with dev_warn.

Signed-off-by: Nicholas Krause <xerofoify@gmail.com>
Reviewed-by: Benjamin Tissoires <benajmin.tissoires@redhat.com>
[jkosina@suse.cz: massaged changelog a bit]
[jkosina@suse.cz: reformatted source]
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
  • Loading branch information
Nicholas Krause authored and Jiri Kosina committed Feb 5, 2016
1 parent d542176 commit 0c4b3c6
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions drivers/hid/hid-multitouch.c
Original file line number Diff line number Diff line change
@@ -1133,6 +1133,9 @@ static int mt_probe(struct hid_device *hdev, const struct hid_device_id *id)
return ret;

ret = sysfs_create_group(&hdev->dev.kobj, &mt_attribute_group);
if (ret)
dev_warn(&hdev->dev, "Cannot allocate sysfs group for %s\n",
hdev->name);

mt_set_maxcontacts(hdev);
mt_set_input_mode(hdev);

0 comments on commit 0c4b3c6

Please sign in to comment.