usb: gadget: at91_udc: add missing clk_put on fclk and iclk

This patch adds missing clk_put on fclk and iclk in case the probe function
fails after these clocks have been retrieved.

Signed-off-by: Boris BREZILLON <b.brezillon@overkiz.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
This commit is contained in:
Boris BREZILLON 2013-08-02 10:37:27 +02:00 committed by Felipe Balbi
parent 93487aa163
commit 30ce198716
1 changed files with 4 additions and 0 deletions

View File

@ -1851,6 +1851,10 @@ static int at91udc_probe(struct platform_device *pdev)
fail2: fail2:
free_irq(udc->udp_irq, udc); free_irq(udc->udp_irq, udc);
fail1: fail1:
if (!IS_ERR(udc->fclk))
clk_put(udc->fclk);
if (!IS_ERR(udc->iclk))
clk_put(udc->iclk);
iounmap(udc->udp_baseaddr); iounmap(udc->udp_baseaddr);
fail0a: fail0a:
if (cpu_is_at91rm9200()) if (cpu_is_at91rm9200())