Add clock prepare and unprepare as required by clock framework.
Signed-off-by: Robert Jarzmik <robert.jarzmik@free.fr>
Signed-off-by: Felipe Balbi <balbi@ti.com>
retval = PTR_ERR(udc->clk);
goto err_clk;
}
+ retval = clk_prepare(udc->clk);
+ if (retval)
+ goto err_clk_prepare;
retval = -ENOMEM;
udc->regs = ioremap(regs->start, resource_size(regs));
err_irq:
iounmap(udc->regs);
err_map:
+ clk_unprepare(udc->clk);
+err_clk_prepare:
clk_put(udc->clk);
udc->clk = NULL;
err_clk:
udc->transceiver = NULL;
the_controller = NULL;
+ clk_unprepare(udc->clk);
clk_put(udc->clk);
iounmap(udc->regs);