diff options
author | Wei Yongjun <yongjun_wei@trendmicro.com.cn> | 2013-04-26 02:27:09 -0400 |
---|---|---|
committer | Felipe Balbi <balbi@ti.com> | 2013-05-15 10:19:12 -0400 |
commit | 4b7e450fb5cefb5865c77999a675330206ab3b8a (patch) | |
tree | 24c22789f6de2b92e06fd1d06480b73e2d3ba3e9 /drivers/usb/musb/omap2430.c | |
parent | c8c18883ba8b8c7f2d9d463c8cf948b944e3c2df (diff) |
usb: musb: omap2430: add missing platform_device_put() on error in omap2430_probe()
Add the missing platform_device_put() before return from
omap2430_probe() in the error handling case.
Introduced by commit ca784be36cc725bca9b526eba342de7550329731
(usb: start using the control module driver)
Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Diffstat (limited to 'drivers/usb/musb/omap2430.c')
-rw-r--r-- | drivers/usb/musb/omap2430.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/usb/musb/omap2430.c b/drivers/usb/musb/omap2430.c index 3551f1a30c65..628b93fe5ccc 100644 --- a/drivers/usb/musb/omap2430.c +++ b/drivers/usb/musb/omap2430.c | |||
@@ -549,7 +549,8 @@ static int omap2430_probe(struct platform_device *pdev) | |||
549 | glue->control_otghs = omap_get_control_dev(); | 549 | glue->control_otghs = omap_get_control_dev(); |
550 | if (IS_ERR(glue->control_otghs)) { | 550 | if (IS_ERR(glue->control_otghs)) { |
551 | dev_vdbg(&pdev->dev, "Failed to get control device\n"); | 551 | dev_vdbg(&pdev->dev, "Failed to get control device\n"); |
552 | return -ENODEV; | 552 | ret = PTR_ERR(glue->control_otghs); |
553 | goto err2; | ||
553 | } | 554 | } |
554 | } else { | 555 | } else { |
555 | glue->control_otghs = ERR_PTR(-ENODEV); | 556 | glue->control_otghs = ERR_PTR(-ENODEV); |