HID: pidff: fix error return code in hid_pidff_init()
authorZhen Lei <thunder.leizhen@huawei.com>
Sat, 8 May 2021 02:47:37 +0000 (10:47 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 10 Jun 2021 11:39:15 +0000 (13:39 +0200)
commit744db828d6f9a0908f64d337642bb8ee227a7ea9
treeb5ba5b620b6e3c59d88f004c3f2fd00ef4701fe6
parent39b92726a38092c704c4e1bcc8262a8959ae978e
HID: pidff: fix error return code in hid_pidff_init()

[ Upstream commit 3dd653c077efda8152f4dd395359617d577a54cd ]

Fix to return a negative error code from the error handling
case instead of 0, as done elsewhere in this function.

Fixes: 224ee88fe395 ("Input: add force feedback driver for PID devices")
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Zhen Lei <thunder.leizhen@huawei.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/hid/usbhid/hid-pidff.c