]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
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 10:41:35 +0000 (12:41 +0200)
commit17970e1d9850c2b9f88f55f915dba7eab99d29d6
treee515bfde574397c25c68933b5c0c3935c0808872
parent11ccd03a20cb5ff4df1586db4f68a8cf45b84139
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