diff mbox series

[v2,1/2] spi: meson-spicc: fix memory leak in meson_spicc_probe

Message ID 1623562156-21995-1-git-send-email-zpershuai@gmail.com (mailing list archive)
State New, archived
Headers show
Series [v2,1/2] spi: meson-spicc: fix memory leak in meson_spicc_probe | expand

Commit Message

zpershuai June 13, 2021, 5:29 a.m. UTC
when meson_spicc_clk_init returns failed, it should goto the
out_clk label.

Signed-off-by: zpershuai <zpershuai@gmail.com>
---
 drivers/spi/spi-meson-spicc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Neil Armstrong June 14, 2021, 1:08 p.m. UTC | #1
Hi,

On 13/06/2021 07:29, zpershuai wrote:
> when meson_spicc_clk_init returns failed, it should goto the
> out_clk label.
> 
> Signed-off-by: zpershuai <zpershuai@gmail.com>
> ---
>  drivers/spi/spi-meson-spicc.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/spi/spi-meson-spicc.c b/drivers/spi/spi-meson-spicc.c
> index ecba6b4..d675334 100644
> --- a/drivers/spi/spi-meson-spicc.c
> +++ b/drivers/spi/spi-meson-spicc.c
> @@ -752,7 +752,7 @@ static int meson_spicc_probe(struct platform_device *pdev)
>  	ret = meson_spicc_clk_init(spicc);
>  	if (ret) {
>  		dev_err(&pdev->dev, "clock registration failed\n");
> -		goto out_master;
> +		goto out_clk;
>  	}
>  
>  	ret = devm_spi_register_master(&pdev->dev, master);
> 

Reviewed-by: Neil Armstrong <narmstrong@baylibre.com>
Mark Brown June 14, 2021, 7:53 p.m. UTC | #2
On Sun, 13 Jun 2021 13:29:16 +0800, zpershuai wrote:
> when meson_spicc_clk_init returns failed, it should goto the
> out_clk label.

Applied to

   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi.git for-next

Thanks!

[1/2] spi: meson-spicc: fix memory leak in meson_spicc_probe
      commit: b2d501c13470409ee7613855b17e5e5ec4111e1c

All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.

You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying
to this mail.

Thanks,
Mark
diff mbox series

Patch

diff --git a/drivers/spi/spi-meson-spicc.c b/drivers/spi/spi-meson-spicc.c
index ecba6b4..d675334 100644
--- a/drivers/spi/spi-meson-spicc.c
+++ b/drivers/spi/spi-meson-spicc.c
@@ -752,7 +752,7 @@  static int meson_spicc_probe(struct platform_device *pdev)
 	ret = meson_spicc_clk_init(spicc);
 	if (ret) {
 		dev_err(&pdev->dev, "clock registration failed\n");
-		goto out_master;
+		goto out_clk;
 	}
 
 	ret = devm_spi_register_master(&pdev->dev, master);