diff options
author | Axel Lin <axel.lin@gmail.com> | 2011-07-19 10:14:04 +0200 |
---|---|---|
committer | Jiri Kosina <jkosina@suse.cz> | 2011-07-20 11:55:18 +0200 |
commit | 2dcd9543a28da523a179a13b1eefa5f9b8e05d72 (patch) | |
tree | a11707336226b54ec1f72c3e99a4f953cad1b088 /drivers | |
parent | HID: ACRUX - add missing hid_hw_stop() in ax_probe() error path (diff) | |
download | linux-2dcd9543a28da523a179a13b1eefa5f9b8e05d72.tar.xz linux-2dcd9543a28da523a179a13b1eefa5f9b8e05d72.zip |
HID: emsff: properly handle emsff_init failure
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>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/hid/hid-emsff.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/hid/hid-emsff.c b/drivers/hid/hid-emsff.c index 81877c67caea..a5dc13fe367b 100644 --- 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: |