Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

HID: multitouch: warn on sysfs group creation failure

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>

authored by

Nicholas Krause and committed by
Jiri Kosina
0c4b3c63 d542176f

+3
+3
drivers/hid/hid-multitouch.c
··· 1133 1133 return ret; 1134 1134 1135 1135 ret = sysfs_create_group(&hdev->dev.kobj, &mt_attribute_group); 1136 + if (ret) 1137 + dev_warn(&hdev->dev, "Cannot allocate sysfs group for %s\n", 1138 + hdev->name); 1136 1139 1137 1140 mt_set_maxcontacts(hdev); 1138 1141 mt_set_input_mode(hdev);