Skip to contentSkip to conversation

spi: meson-spicc: fix memory leak in meson_spicc_probe

PATCH In review zpershuai 3 participants 3 messages Jun 13, 2021 – Jun 14, 2021

Subsystems (2)
lore
Share & tools
lore

zpershuai

author
#0 lore raw

PATCH v2 1/2 spi: meson-spicc: fix memory leak in meson_spicc_probe

when meson_spicc_clk_init returns failed, it should goto the out_clk label.

---
 drivers/spi/spi-meson-spicc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/spi/spi-meson-spicc.c +1 -1
index ecba6b4..d675334 100644
@@ -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);
Signature · 1 line
2.7.4
Reviewed-by on v2 1/2
#1 lore raw

Hi,

Quoted 14 lines · zpershuai

when meson_spicc_clk_init returns failed, it should goto the out_clk label.

---
 drivers/spi/spi-meson-spicc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/spi/spi-meson-spicc.c +0 -0
index ecba6b4..d675334 100644

drivers/spi/spi-meson-spicc.c static int meson_spicc_probe(struct platform_device *pdev) · line 758

Quoted 8 lines
drivers/spi/spi-meson-spicc.c +1 -1
@@ -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);

_______________________________________________
linux-amlogic mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-amlogic

maintainer
#2 lore raw
In reply to zpershuai
Quoted 2 lines · zpershuai

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