summaryrefslogtreecommitdiffstats
path: root/drivers/usb/gadget/at91_udc.c
diff options
context:
space:
mode:
authorBoris BREZILLON <b.brezillon@overkiz.com>2013-08-02 10:37:27 +0200
committerFelipe Balbi <balbi@ti.com>2013-08-02 15:17:02 +0300
commit30ce1987160e64f58d92359ee11999e1218a45b9 (patch)
treed1a5e3ca15ac7cd863a8719bfb0a18ef42611a83 /drivers/usb/gadget/at91_udc.c
parent93487aa1639d2151820f3988f62005d0a00e9269 (diff)
downloadop-kernel-dev-30ce1987160e64f58d92359ee11999e1218a45b9.zip
op-kernel-dev-30ce1987160e64f58d92359ee11999e1218a45b9.tar.gz
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>
Diffstat (limited to 'drivers/usb/gadget/at91_udc.c')
-rw-r--r--drivers/usb/gadget/at91_udc.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/usb/gadget/at91_udc.c b/drivers/usb/gadget/at91_udc.c
index d237429..94d1d3c 100644
--- a/drivers/usb/gadget/at91_udc.c
+++ b/drivers/usb/gadget/at91_udc.c
@@ -1851,6 +1851,10 @@ fail3:
fail2:
free_irq(udc->udp_irq, udc);
fail1:
+ if (!IS_ERR(udc->fclk))
+ clk_put(udc->fclk);
+ if (!IS_ERR(udc->iclk))
+ clk_put(udc->iclk);
iounmap(udc->udp_baseaddr);
fail0a:
if (cpu_is_at91rm9200())
OpenPOWER on IntegriCloud