Commit 3762a33b authored by Arvind Yadav's avatar Arvind Yadav Committed by Boris Brezillon

mtd: nand: orion: Handle return value of clk_prepare_enable

clk_prepare_enable() can fail here and we must check its return value.
Signed-off-by: default avatarArvind Yadav <arvind.yadav.cs@gmail.com>
Signed-off-by: default avatarBoris Brezillon <boris.brezillon@free-electrons.com>
parent d45e5316
...@@ -166,7 +166,11 @@ static int __init orion_nand_probe(struct platform_device *pdev) ...@@ -166,7 +166,11 @@ static int __init orion_nand_probe(struct platform_device *pdev)
} }
} }
clk_prepare_enable(info->clk); ret = clk_prepare_enable(info->clk);
if (ret) {
dev_err(&pdev->dev, "failed to prepare clock!\n");
return ret;
}
ret = nand_scan(mtd, 1); ret = nand_scan(mtd, 1);
if (ret) if (ret)
......
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