usb: gadget: audio: Fix a missing error return value in audio_bind()
authorChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Sun, 3 May 2020 10:47:07 +0000 (12:47 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 20 May 2020 06:22:32 +0000 (08:22 +0200)
commitb0b5e6a96683e8d35eb517c5aa0cd7425c4061a3
treeb6e2997a929dc13344870037e47b90a9935a2fb6
parentbf42b6275ca3ee9e893fcd8268405ff347986ec2
usb: gadget: audio: Fix a missing error return value in audio_bind()

commit 19b94c1f9c9a16d41a8de3ccbdb8536cf1aecdbf upstream.

If 'usb_otg_descriptor_alloc()' fails, we must return an error code, not 0.

Fixes: 56023ce0fd70 ("usb: gadget: audio: allocate and init otg descriptor by otg capabilities")
Reviewed-by: Peter Chen <peter.chen@nxp.com>
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Signed-off-by: Felipe Balbi <balbi@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/gadget/legacy/audio.c