aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb
diff options
context:
space:
mode:
authorSebastian Andrzej Siewior <bigeasy@linutronix.de>2011-06-03 13:50:47 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2011-06-06 19:28:03 -0400
commit6bc129532176fcafb4202b73b3f431986391a362 (patch)
tree4d1473e3c7dfa699074dae02a7e2e63e221f5fb0 /drivers/usb
parenta6207b17ece4ea40c378233b1ddf2a7f4288419d (diff)
usb/s3c-hsudc: fix error path
I doubt the clock is optional. In case it is it should not return with an error code because we leak everything. Cc: Jingoo Han <jg1.han@samsung.com> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb')
-rw-r--r--drivers/usb/gadget/s3c-hsudc.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/usb/gadget/s3c-hsudc.c b/drivers/usb/gadget/s3c-hsudc.c
index 9a1b966e18db..d5e3e1e58626 100644
--- a/drivers/usb/gadget/s3c-hsudc.c
+++ b/drivers/usb/gadget/s3c-hsudc.c
@@ -1302,7 +1302,8 @@ static int s3c_hsudc_probe(struct platform_device *pdev)
1302 hsudc->uclk = clk_get(&pdev->dev, "usb-device"); 1302 hsudc->uclk = clk_get(&pdev->dev, "usb-device");
1303 if (IS_ERR(hsudc->uclk)) { 1303 if (IS_ERR(hsudc->uclk)) {
1304 dev_err(dev, "failed to find usb-device clock source\n"); 1304 dev_err(dev, "failed to find usb-device clock source\n");
1305 return PTR_ERR(hsudc->uclk); 1305 ret = PTR_ERR(hsudc->uclk);
1306 goto err_clk;
1306 } 1307 }
1307 clk_enable(hsudc->uclk); 1308 clk_enable(hsudc->uclk);
1308 1309
@@ -1311,7 +1312,8 @@ static int s3c_hsudc_probe(struct platform_device *pdev)
1311 disable_irq(hsudc->irq); 1312 disable_irq(hsudc->irq);
1312 local_irq_enable(); 1313 local_irq_enable();
1313 return 0; 1314 return 0;
1314 1315err_clk:
1316 free_irq(hsudc->irq, hsudc);
1315err_irq: 1317err_irq:
1316 iounmap(hsudc->regs); 1318 iounmap(hsudc->regs);
1317 1319