linux/drivers/usb/gadget/legacy
Wei Yongjun e8f7f9e349 usb: gadget: legacy: fix error return code in cdc_bind()
If 'usb_otg_descriptor_alloc()' fails, we must return a
negative error code -ENOMEM, not 0.

Fixes: ab6796ae98 ("usb: gadget: cdc2: allocate and init otg descriptor by otg capabilities")
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
Signed-off-by: Felipe Balbi <balbi@kernel.org>
2020-05-09 11:05:08 +03:00
..
acm_ms.c usb: gadget: Remove set but not used variable 'opts' in acm_ms_do_config 2019-10-22 10:39:01 +03:00
audio.c usb: gadget: audio: Fix a missing error return value in audio_bind() 2020-05-09 11:05:02 +03:00
cdc2.c usb: gadget: legacy: fix error return code in cdc_bind() 2020-05-09 11:05:08 +03:00
dbgp.c USB: add SPDX identifiers to all remaining files in drivers/usb/ 2017-11-04 11:48:02 +01:00
ether.c USB: gadget: legacy: Remove redundant license text 2017-11-07 15:45:02 +01:00
g_ffs.c usb: gadget: legacy: set max_speed to super-speed 2020-01-15 10:39:21 +01:00
gmidi.c usb: gadget: legacy: gmidi: remove useless cast for driver.name 2020-02-19 11:10:24 +01:00
hid.c USB: gadget: legacy: Remove redundant license text 2017-11-07 15:45:02 +01:00
inode.c usb: gadget: legacy: fix redundant initialization warnings 2020-05-09 11:05:08 +03:00
Kconfig usb: get rid of 'choice' for legacy gadget drivers 2020-03-16 08:36:35 +01:00
Makefile usb: gadget: add raw-gadget interface 2020-03-15 11:34:48 +02:00
mass_storage.c usb: gadget: Remove set but not used variable 'opts' in msg_do_config 2019-10-22 10:39:04 +03:00
multi.c usb: gadget: legacy: set max_speed to super-speed 2020-01-15 10:39:21 +01:00
ncm.c usb: gadget: legacy: set max_speed to super-speed 2020-01-15 10:39:21 +01:00
nokia.c USB: gadget: legacy: Remove redundant license text 2017-11-07 15:45:02 +01:00
printer.c USB: gadget: legacy: Remove redundant license text 2017-11-07 15:45:02 +01:00
raw_gadget.c usb: raw-gadget: fix raw_event_queue_fetch locking 2020-04-16 14:52:14 +02:00
serial.c usb: gadget: legacy/serial: allow dynamic removal 2019-10-22 10:27:15 +03:00
tcm_usb_gadget.c usb: gadget: tcm: fix spelling mistake: "Manufactor" -> "Manufacturer" 2018-07-26 13:35:29 +03:00
webcam.c usb: gadget: uvc: Move trace parameter to function module 2018-07-26 13:33:48 +03:00
zero.c USB: gadget: legacy: Remove redundant license text 2017-11-07 15:45:02 +01:00