usb: gadget: hid: fix error return code in hid_bind()
authorYang Yingliang <yangyingliang@huawei.com>
Fri, 18 Jun 2021 04:38:35 +0000 (12:38 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 20 Jul 2021 14:17:50 +0000 (16:17 +0200)
commite8f59f48f113ed8ea64b3f241bd017c70e7fc3fd
tree8f222193a886617172f9d8dd52cc63b1e58ca43f
parent2338690b60d54dc8832a690091dd5c51efc132bb
usb: gadget: hid: fix error return code in hid_bind()

[ Upstream commit 88693f770bb09c196b1eb5f06a484a254ecb9924 ]

Fix to return a negative error code from the error handling
case instead of 0.

Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
Link: https://lore.kernel.org/r/20210618043835.2641360-1-yangyingliang@huawei.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/usb/gadget/legacy/hid.c