提交 d61a70ec 编写于 作者: M Michal Malý 提交者: Jiri Kosina

HID: hid-lg4ff: Allow the driver to continue without sysfs interface

Allow the driver to continue without sysfs interface. Instead of bailing out
allow the driver to continue in a degraded mode.
Signed-off-by: NMichal Malý <madcatxster@devoid-pointer.net>
Signed-off-by: NJiri Kosina <jkosina@suse.cz>
上级 5d9d60ad
......@@ -1229,15 +1229,14 @@ int lg4ff_init(struct hid_device *hid)
/* Create sysfs interface */
error = device_create_file(&hid->dev, &dev_attr_range);
if (error)
goto err_init;
hid_warn(hid, "Unable to create sysfs interface for \"range\", errno %d\n", error);
if (mmode_ret == LG4FF_MMODE_IS_MULTIMODE) {
error = device_create_file(&hid->dev, &dev_attr_real_id);
if (error)
goto err_init;
hid_warn(hid, "Unable to create sysfs interface for \"real_id\", errno %d\n", error);
error = device_create_file(&hid->dev, &dev_attr_alternate_modes);
if (error)
goto err_init;
hid_warn(hid, "Unable to create sysfs interface for \"alternate_modes\", errno %d\n", error);
}
dbg_hid("sysfs interface created\n");
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册