Commit b2d501c1 authored by zpershuai's avatar zpershuai Committed by Mark Brown

spi: meson-spicc: fix memory leak in meson_spicc_probe

when meson_spicc_clk_init returns failed, it should goto the
out_clk label.
Signed-off-by: default avatarzpershuai <zpershuai@gmail.com>
Reviewed-by: default avatarNeil Armstrong <narmstrong@baylibre.com>
Link: https://lore.kernel.org/r/1623562156-21995-1-git-send-email-zpershuai@gmail.comSigned-off-by: default avatarMark Brown <broonie@kernel.org>
parent 95730d5e
......@@ -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);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment