Skip to content

Commit 3756a27

Browse files
oneukumJiri Kosina
authored andcommitted
HID: hid-pl: handle probe errors
Errors in init must be reported back or we'll follow a NULL pointer the first time FF is used. Fixes: 20eb127 ("hid: force feedback driver for PantherLord USB/PS2 2in1 Adapter") Cc: stable@vger.kernel.org Signed-off-by: Oliver Neukum <oneukum@suse.com> Signed-off-by: Jiri Kosina <jkosina@suse.com>
1 parent 822bc5b commit 3756a27

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

drivers/hid/hid-pl.c

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,9 +194,14 @@ static int pl_probe(struct hid_device *hdev, const struct hid_device_id *id)
194194
goto err;
195195
}
196196

197-
plff_init(hdev);
197+
ret = plff_init(hdev);
198+
if (ret)
199+
goto stop;
198200

199201
return 0;
202+
203+
stop:
204+
hid_hw_stop(hdev);
200205
err:
201206
return ret;
202207
}

0 commit comments

Comments
 (0)