[PATCH] net: gem: Fix error path in zynq_gem_probe
Michal Simek
monstr at monstr.eu
Tue Feb 23 14:44:40 CET 2021
čt 11. 2. 2021 v 19:06 odesílatel Michal Simek <michal.simek at xilinx.com> napsal:
>
> Clean up error path in connection where priv->rxbuffers and priv->tx_bd are
> allocated.
>
> Signed-off-by: Michal Simek <michal.simek at xilinx.com>
> ---
>
> Based on
> https://lists.denx.de/pipermail/u-boot/2021-February/440943.html
> https://lists.denx.de/pipermail/u-boot/2021-February/441021.html
> ---
> drivers/net/zynq_gem.c | 8 ++++----
> 1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/net/zynq_gem.c b/drivers/net/zynq_gem.c
> index 9ed013ee5124..baf06a2ad897 100644
> --- a/drivers/net/zynq_gem.c
> +++ b/drivers/net/zynq_gem.c
> @@ -708,14 +708,14 @@ static int zynq_gem_probe(struct udevice *dev)
> ret = clk_get_by_name(dev, "tx_clk", &priv->tx_clk);
> if (ret < 0) {
> dev_err(dev, "failed to get tx_clock\n");
> - goto err1;
> + goto err2;
> }
>
> if (priv->clk_en_info & RXCLK_EN) {
> ret = clk_get_by_name(dev, "rx_clk", &priv->rx_clk);
> if (ret < 0) {
> dev_err(dev, "failed to get rx_clock\n");
> - goto err1;
> + goto err2;
> }
> }
>
> @@ -737,9 +737,9 @@ static int zynq_gem_probe(struct udevice *dev)
> err3:
> mdio_unregister(priv->bus);
> err2:
> - free(priv->rxbuffers);
> -err1:
> free(priv->tx_bd);
> +err1:
> + free(priv->rxbuffers);
> return ret;
> }
>
> --
> 2.30.0
>
Applied.
M
--
Michal Simek, Ing. (M.Eng), OpenPGP -> KeyID: FE3D1F91
w: www.monstr.eu p: +42-0-721842854
Maintainer of Linux kernel - Xilinx Microblaze
Maintainer of Linux kernel - Xilinx Zynq ARM and ZynqMP ARM64 SoCs
U-Boot custodian - Xilinx Microblaze/Zynq/ZynqMP/Versal SoCs
More information about the U-Boot
mailing list