Skip to content
/ linux Public

Commit 1d46d07

Browse files
oneukumSasha Levin
authored andcommitted
HID: hid-pl: handle probe errors
[ Upstream commit 3756a27 ] 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> Signed-off-by: Sasha Levin <sashal@kernel.org>
1 parent 4a1afa3 commit 1d46d07

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

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)