projects
/
GitHub
/
LineageOS
/
android_kernel_motorola_exynos9610.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b30d89d
)
HID: emsff: properly handle emsff_init failure
author
Axel Lin
<axel.lin@gmail.com>
Tue, 19 Jul 2011 08:14:04 +0000
(16:14 +0800)
committer
Jiri Kosina
<jkosina@suse.cz>
Wed, 20 Jul 2011 09:55:18 +0000
(11:55 +0200)
emsff_init() may fail, let's properly handle the failure.
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
drivers/hid/hid-emsff.c
patch
|
blob
|
blame
|
history
diff --git
a/drivers/hid/hid-emsff.c
b/drivers/hid/hid-emsff.c
index 81877c67caea5891d71d526094978aa607b3d508..a5dc13fe367b7584e8290e1e5dcd29c5cd028df7 100644
(file)
--- a/
drivers/hid/hid-emsff.c
+++ b/
drivers/hid/hid-emsff.c
@@
-126,7
+126,12
@@
static int ems_probe(struct hid_device *hdev, const struct hid_device_id *id)
goto err;
}
- emsff_init(hdev);
+ ret = emsff_init(hdev);
+ if (ret) {
+ dev_err(&hdev->dev, "force feedback init failed\n");
+ hid_hw_stop(hdev);
+ goto err;
+ }
return 0;
err: