提交 1f8eaff2 编写于 作者: E Ezequiel Garcia 提交者: David Woodhouse

mtd: nand: pxa3xx: Check for clk_prepare_enable() return value

clk_prepare_enable() can fail due to unknown reason.
Add a check for this and return the error code if it fails.
Signed-off-by: NEzequiel Garcia <ezequiel.garcia@free-electrons.com>
Signed-off-by: NArtem Bityutskiy <artem.bityutskiy@linux.intel.com>
Signed-off-by: NDavid Woodhouse <David.Woodhouse@intel.com>
上级 fb32061f
......@@ -1072,7 +1072,9 @@ static int alloc_nand_resource(struct platform_device *pdev)
dev_err(&pdev->dev, "failed to get nand clock\n");
return PTR_ERR(info->clk);
}
clk_prepare_enable(info->clk);
ret = clk_prepare_enable(info->clk);
if (ret < 0)
return ret;
/*
* This is a dirty hack to make this driver work from devicetree
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册