Skip to content

Commit 0c4b3c6

Browse files
NwPKrauseJiri Kosina
authored andcommitted
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 <[email protected]> Reviewed-by: Benjamin Tissoires <[email protected]> [[email protected]: massaged changelog a bit] [[email protected]: reformatted source] Signed-off-by: Jiri Kosina <[email protected]>
1 parent d542176 commit 0c4b3c6

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

drivers/hid/hid-multitouch.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1133,6 +1133,9 @@ static int mt_probe(struct hid_device *hdev, const struct hid_device_id *id)
11331133
return ret;
11341134

11351135
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);
11361139

11371140
mt_set_maxcontacts(hdev);
11381141
mt_set_input_mode(hdev);

0 commit comments

Comments
 (0)