Commit 007b4e8b authored by Marc Gonzalez's avatar Marc Gonzalez Committed by Boris Brezillon

mtd: rawnand: tango: Fix struct clk memory leak

Use devm_clk_get() to let Linux manage struct clk memory.

Fixes: 6956e238 ("add tango NAND flash controller support")
Cc: stable@vger.kernel.org
Reported-by: default avatarXidong Wang <wangxidong_97@163.com>
Signed-off-by: default avatarMarc Gonzalez <marc_gonzalez@sigmadesigns.com>
Reviewed-by: default avatarMiquel Raynal <miquel.raynal@bootlin.com>
Signed-off-by: default avatarBoris Brezillon <boris.brezillon@bootlin.com>
parent 60cc43fc
...@@ -645,7 +645,7 @@ static int tango_nand_probe(struct platform_device *pdev) ...@@ -645,7 +645,7 @@ static int tango_nand_probe(struct platform_device *pdev)
writel_relaxed(MODE_RAW, nfc->pbus_base + PBUS_PAD_MODE); writel_relaxed(MODE_RAW, nfc->pbus_base + PBUS_PAD_MODE);
clk = clk_get(&pdev->dev, NULL); clk = devm_clk_get(&pdev->dev, NULL);
if (IS_ERR(clk)) if (IS_ERR(clk))
return PTR_ERR(clk); return PTR_ERR(clk);
......
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