usb: gadget: net2272: Fix a memory leak in an error handling path in 'net2272_plat_pr...
authorChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Mon, 27 Apr 2020 18:04:23 +0000 (20:04 +0200)
committerFelipe Balbi <balbi@kernel.org>
Sat, 9 May 2020 08:05:08 +0000 (11:05 +0300)
commitccaef7e6e354fb65758eaddd3eae8065a8b3e295
treee8816e15fdf3e2e9a4300b30aa2a527dd4a20ed4
parentf058764d19000d98aef72010468db1f69faf9fa0
usb: gadget: net2272: Fix a memory leak in an error handling path in 'net2272_plat_probe()'

'dev' is allocated in 'net2272_probe_init()'. It must be freed in the error
handling path, as already done in the remove function (i.e.
'net2272_plat_remove()')

Fixes: 90fccb529d24 ("usb: gadget: Gadget directory cleanup - group UDC drivers")
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Signed-off-by: Felipe Balbi <balbi@kernel.org>
drivers/usb/gadget/udc/net2272.c