Commit d3fdd701 authored by Arvind Yadav's avatar Arvind Yadav Committed by 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: default avatarArvind Yadav <arvind.yadav.cs@gmail.com>
CC: Russell King <rmk+kernel@armlinux.org.uk>
Signed-off-by: default avatarDominik Brodowski <linux@dominikbrodowski.net>
parent 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%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment