mirror of
https://github.com/torvalds/linux.git
synced 2026-05-30 18:13:41 +02:00
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: 20eb127906 ("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>
This commit is contained in:
parent
822bc5b374
commit
3756a272d2
|
|
@ -194,9 +194,14 @@ static int pl_probe(struct hid_device *hdev, const struct hid_device_id *id)
|
|||
goto err;
|
||||
}
|
||||
|
||||
plff_init(hdev);
|
||||
ret = plff_init(hdev);
|
||||
if (ret)
|
||||
goto stop;
|
||||
|
||||
return 0;
|
||||
|
||||
stop:
|
||||
hid_hw_stop(hdev);
|
||||
err:
|
||||
return ret;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user