Skip to content

Commit 3dd653c

Browse files
Zhen LeiJiri Kosina
authored andcommitted
HID: pidff: fix error return code in hid_pidff_init()
Fix to return a negative error code from the error handling case instead of 0, as done elsewhere in this function. Fixes: 224ee88 ("Input: add force feedback driver for PID devices") Reported-by: Hulk Robot <[email protected]> Signed-off-by: Zhen Lei <[email protected]> Signed-off-by: Jiri Kosina <[email protected]>
1 parent 81c8bf9 commit 3dd653c

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

drivers/hid/usbhid/hid-pidff.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1292,6 +1292,7 @@ int hid_pidff_init(struct hid_device *hid)
12921292

12931293
if (pidff->pool[PID_DEVICE_MANAGED_POOL].value &&
12941294
pidff->pool[PID_DEVICE_MANAGED_POOL].value[0] == 0) {
1295+
error = -EPERM;
12951296
hid_notice(hid,
12961297
"device does not support device managed pool\n");
12971298
goto fail;

0 commit comments

Comments
 (0)