lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <5cb3a029-2452-dbeb-691f-1c29ab7019bc@linaro.org>
Date:   Mon, 12 Jun 2023 12:02:02 +0200
From:   Neil Armstrong <neil.armstrong@...aro.org>
To:     Christophe JAILLET <christophe.jaillet@...adoo.fr>,
        Thinh Nguyen <Thinh.Nguyen@...opsys.com>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        Kevin Hilman <khilman@...libre.com>,
        Jerome Brunet <jbrunet@...libre.com>,
        Martin Blumenstingl <martin.blumenstingl@...glemail.com>,
        Felipe Balbi <balbi@...nel.org>,
        Yue Wang <yue.wang@...ogic.com>,
        Hanjie Lin <hanjie.lin@...ogic.com>
Cc:     linux-kernel@...r.kernel.org, kernel-janitors@...r.kernel.org,
        linux-usb@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
        linux-amlogic@...ts.infradead.org
Subject: Re: [PATCH] usb: dwc3-meson-g12a: Fix an error handling path in
 dwc3_meson_g12a_probe()

On 10/06/2023 15:32, Christophe JAILLET wrote:
> 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@...adoo.fr>
> ---
>   drivers/usb/dwc3/dwc3-meson-g12a.c | 5 ++++-
>   1 file changed, 4 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/usb/dwc3/dwc3-meson-g12a.c b/drivers/usb/dwc3/dwc3-meson-g12a.c
> index 365aec00d302..e99c7489dba0 100644
> --- a/drivers/usb/dwc3/dwc3-meson-g12a.c
> +++ b/drivers/usb/dwc3/dwc3-meson-g12a.c
> @@ -796,7 +796,7 @@ static int dwc3_meson_g12a_probe(struct platform_device *pdev)
>   
>   	ret = dwc3_meson_g12a_otg_init(pdev, priv);
>   	if (ret)
> -		goto err_phys_power;
> +		goto err_plat_depopulate;
>   
>   	pm_runtime_set_active(dev);
>   	pm_runtime_enable(dev);
> @@ -804,6 +804,9 @@ static int dwc3_meson_g12a_probe(struct platform_device *pdev)
>   
>   	return 0;
>   
> +err_plat_depopulate:
> +	of_platform_depopulate(dev);
> +
>   err_phys_power:
>   	for (i = 0 ; i < PHY_COUNT ; ++i)
>   		phy_power_off(priv->phys[i]);

Reviewed-by: Neil Armstrong <neil.armstrong@...aro.org>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ