Skip to content
Commit e27d4b30 authored by Wei Yongjun's avatar Wei Yongjun Committed by Felipe Balbi
Browse files

usb: gadget: legacy: fix error return code in gncm_bind()

If 'usb_otg_descriptor_alloc()' fails, we must return a
negative error code -ENOMEM, not 0.

Fixes: 1156e91d

 ("usb: gadget: ncm: allocate and init otg descriptor by otg capabilities")
Reported-by: default avatarHulk Robot <hulkci@huawei.com>
Signed-off-by: default avatarWei Yongjun <weiyongjun1@huawei.com>
Signed-off-by: default avatarFelipe Balbi <balbi@kernel.org>
parent e8f7f9e3
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment