Missing handler for freeing requested IRQ added.
Moreover clk_ calls has been reorganized.
Signed-off-by: Lukasz Majewski <l.majewski@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
hsotg->supplies);
if (ret) {
dev_err(dev, "failed to request supplies: %d\n", ret);
- goto err_supplies;
+ goto err_irq;
}
ret = regulator_bulk_enable(ARRAY_SIZE(hsotg->supplies),
return 0;
- err_ep_mem:
+err_ep_mem:
kfree(eps);
-
err_supplies:
s3c_hsotg_phy_disable(hsotg);
-
regulator_bulk_free(ARRAY_SIZE(hsotg->supplies), hsotg->supplies);
-
- clk_disable_unprepare(hsotg->clk);
- clk_put(hsotg->clk);
-
+err_irq:
+ free_irq(hsotg->irq, hsotg);
err_regs:
iounmap(hsotg->regs);
release_resource(hsotg->regs_res);
kfree(hsotg->regs_res);
err_clk:
+ clk_disable_unprepare(hsotg->clk);
clk_put(hsotg->clk);
err_mem:
kfree(hsotg);