[PATCH -next] mtd: rawnand: arasan: Fix missing clk_disable_unprepare() on error in anfc_probe()

Zou Wei zou_wei at huawei.com
Tue Jun 15 21:06:44 PDT 2021


Fix the missing clk_disable_unprepare() before return
from anfc_probe() in the error handling case.

Fixes: 61622f6791a1 ("mtd: rawnand: arasan: Use the right DMA mask")
Reported-by: Hulk Robot <hulkci at huawei.com>
Signed-off-by: Zou Wei <zou_wei at huawei.com>
---
 drivers/mtd/nand/raw/arasan-nand-controller.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/mtd/nand/raw/arasan-nand-controller.c b/drivers/mtd/nand/raw/arasan-nand-controller.c
index 8317d97..9cbcc69 100644
--- a/drivers/mtd/nand/raw/arasan-nand-controller.c
+++ b/drivers/mtd/nand/raw/arasan-nand-controller.c
@@ -1452,7 +1452,7 @@ static int anfc_probe(struct platform_device *pdev)
 
 	ret = dma_set_mask(&pdev->dev, DMA_BIT_MASK(64));
 	if (ret)
-		return ret;
+		goto disable_bus_clk;
 
 	ret = anfc_parse_cs(nfc);
 	if (ret)
-- 
2.6.2




More information about the linux-mtd mailing list