aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/renesas_usbhs/common.c
diff options
context:
space:
mode:
authorKuninori Morimoto <kuninori.morimoto.gx@renesas.com>2011-05-11 03:00:15 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2011-05-11 18:17:02 -0400
commit97f93227e646741adf4d7cbf4baf7a087746e93a (patch)
tree8ebeed675223f6805afb45c8eda16ca29d7b95e7 /drivers/usb/renesas_usbhs/common.c
parentc786e09c35924252ff219241e7027e340b77252d (diff)
usb: renesas_usbhs: fixup error processing on probe/remove
The error processing order was wrong. This patch modify it. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb/renesas_usbhs/common.c')
-rw-r--r--drivers/usb/renesas_usbhs/common.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/usb/renesas_usbhs/common.c b/drivers/usb/renesas_usbhs/common.c
index 34e68e0205c5..f3664d6af661 100644
--- a/drivers/usb/renesas_usbhs/common.c
+++ b/drivers/usb/renesas_usbhs/common.c
@@ -321,11 +321,11 @@ static int __devinit usbhs_probe(struct platform_device *pdev)
321 /* call pipe and module init */ 321 /* call pipe and module init */
322 ret = usbhs_pipe_probe(priv); 322 ret = usbhs_pipe_probe(priv);
323 if (ret < 0) 323 if (ret < 0)
324 goto probe_end_mod_exit; 324 goto probe_end_iounmap;
325 325
326 ret = usbhs_mod_probe(priv); 326 ret = usbhs_mod_probe(priv);
327 if (ret < 0) 327 if (ret < 0)
328 goto probe_end_iounmap; 328 goto probe_end_pipe_exit;
329 329
330 /* dev_set_drvdata should be called after usbhs_mod_init */ 330 /* dev_set_drvdata should be called after usbhs_mod_init */
331 dev_set_drvdata(&pdev->dev, priv); 331 dev_set_drvdata(&pdev->dev, priv);
@@ -346,7 +346,7 @@ static int __devinit usbhs_probe(struct platform_device *pdev)
346 ret = usbhs_platform_call(priv, hardware_init, pdev); 346 ret = usbhs_platform_call(priv, hardware_init, pdev);
347 if (ret < 0) { 347 if (ret < 0) {
348 dev_err(&pdev->dev, "platform prove failed.\n"); 348 dev_err(&pdev->dev, "platform prove failed.\n");
349 goto probe_end_pipe_exit; 349 goto probe_end_mod_exit;
350 } 350 }
351 351
352 /* reset phy for connection */ 352 /* reset phy for connection */
@@ -372,10 +372,10 @@ static int __devinit usbhs_probe(struct platform_device *pdev)
372 372
373probe_end_call_remove: 373probe_end_call_remove:
374 usbhs_platform_call(priv, hardware_exit, pdev); 374 usbhs_platform_call(priv, hardware_exit, pdev);
375probe_end_pipe_exit:
376 usbhs_pipe_remove(priv);
377probe_end_mod_exit: 375probe_end_mod_exit:
378 usbhs_mod_remove(priv); 376 usbhs_mod_remove(priv);
377probe_end_pipe_exit:
378 usbhs_pipe_remove(priv);
379probe_end_iounmap: 379probe_end_iounmap:
380 iounmap(priv->base); 380 iounmap(priv->base);
381probe_end_kfree: 381probe_end_kfree:
@@ -403,8 +403,8 @@ static int __devexit usbhs_remove(struct platform_device *pdev)
403 pm_runtime_disable(&pdev->dev); 403 pm_runtime_disable(&pdev->dev);
404 404
405 usbhs_platform_call(priv, hardware_exit, pdev); 405 usbhs_platform_call(priv, hardware_exit, pdev);
406 usbhs_pipe_remove(priv);
407 usbhs_mod_remove(priv); 406 usbhs_mod_remove(priv);
407 usbhs_pipe_remove(priv);
408 iounmap(priv->base); 408 iounmap(priv->base);
409 kfree(priv); 409 kfree(priv);
410 410