linux-spi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 1/2] spi: meson-spicc: fix memory leak in meson_spicc_probe
@ 2021-06-13  5:29 zpershuai
  2021-06-14 13:08 ` Neil Armstrong
  2021-06-14 19:53 ` Mark Brown
  0 siblings, 2 replies; 3+ messages in thread
From: zpershuai @ 2021-06-13  5:29 UTC (permalink / raw)
  To: Mark Brown, Neil Armstrong, Kevin Hilman, Jerome Brunet,
	Martin Blumenstingl, linux-spi, linux-arm-kernel, linux-amlogic,
	linux-kernel
  Cc: zpershuai

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);
-- 
2.7.4


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-06-14 19:54 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-13  5:29 [PATCH v2 1/2] spi: meson-spicc: fix memory leak in meson_spicc_probe zpershuai
2021-06-14 13:08 ` Neil Armstrong
2021-06-14 19:53 ` Mark Brown

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).