提交 d3fdd701 编写于 作者: A Arvind Yadav 提交者: Dominik Brodowski

pcmcia: soc_common: Handle return value of clk_prepare_enable

clk_prepare_enable() can fail here and we must check its return value.
Signed-off-by: NArvind Yadav <arvind.yadav.cs@gmail.com>
CC: Russell King <rmk+kernel@armlinux.org.uk>
Signed-off-by: NDominik Brodowski <linux@dominikbrodowski.net>
上级 3490a69b
......@@ -191,12 +191,16 @@ static int soc_pcmcia_hw_init(struct soc_pcmcia_socket *skt)
{
int ret = 0, i;
clk_prepare_enable(skt->clk);
ret = clk_prepare_enable(skt->clk);
if (ret)
return ret;
if (skt->ops->hw_init) {
ret = skt->ops->hw_init(skt);
if (ret)
if (ret) {
clk_disable_unprepare(skt->clk);
return ret;
}
}
for (i = 0; i < ARRAY_SIZE(skt->stat); i++) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册