usb: dwc3-meson-g12a: Fix an error handling path in dwc3_meson_g12a_probe()
authorChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Sat, 10 Jun 2023 13:32:52 +0000 (15:32 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 19 Jul 2023 14:21:55 +0000 (16:21 +0200)
commit7a37abf096c255131293e9d5db1de44277e82f6d
treebed563ee3fbd6616fb6597c9952e5e8543025be9
parent04b1c0798deb567e79c245be8d4b6d88e1b3b20e
usb: dwc3-meson-g12a: Fix an error handling path in dwc3_meson_g12a_probe()

[ Upstream commit 01052b91c9808e3c3b068ae2721cb728ec9aa4c0 ]

If dwc3_meson_g12a_otg_init() fails, resources allocated by the previous
of_platform_populate() call should be released, as already done in the
error handling path.

Fixes: 1e355f21d3fb ("usb: dwc3: Add Amlogic A1 DWC3 glue")
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Reviewed-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
Message-ID: <9d28466de1808ccc756b4cc25fc72c482d133d13.1686403934.git.christophe.jaillet@wanadoo.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/usb/dwc3/dwc3-meson-g12a.c