usb: gadget: f_midi: fix error recovery path
authorAndrzej Pietrasiewicz <andrzej.p@samsung.com>
Fri, 3 Jul 2015 12:02:29 +0000 (14:02 +0200)
committerFelipe Balbi <balbi@ti.com>
Mon, 6 Jul 2015 17:34:08 +0000 (12:34 -0500)
commitb2e2c94b878be2500d4d42c1f52a2fa1fe7648b4
tree5da31c96bcaee62996db2d22e6e2327d8be1321a
parent543aa4867d4a2dff5fc11e1b688197ee3bad7f89
usb: gadget: f_midi: fix error recovery path

In case kstrdup() fails the resources to release are
midi->in_port[] and midi. No cards have been registered,
so no need to unregister any.

Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@samsung.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
drivers/usb/gadget/function/f_midi.c