diff options
author | Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> | 2011-05-11 16:00:15 +0900 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2011-05-11 15:17:02 -0700 |
commit | 97f93227e646741adf4d7cbf4baf7a087746e93a (patch) | |
tree | 8ebeed675223f6805afb45c8eda16ca29d7b95e7 /drivers | |
parent | c786e09c35924252ff219241e7027e340b77252d (diff) | |
download | blackbird-op-linux-97f93227e646741adf4d7cbf4baf7a087746e93a.tar.gz blackbird-op-linux-97f93227e646741adf4d7cbf4baf7a087746e93a.zip |
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')
-rw-r--r-- | drivers/usb/renesas_usbhs/common.c | 12 |
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) /* call pipe and module init */ ret = usbhs_pipe_probe(priv); if (ret < 0) - goto probe_end_mod_exit; + goto probe_end_iounmap; ret = usbhs_mod_probe(priv); if (ret < 0) - goto probe_end_iounmap; + goto probe_end_pipe_exit; /* dev_set_drvdata should be called after usbhs_mod_init */ dev_set_drvdata(&pdev->dev, priv); @@ -346,7 +346,7 @@ static int __devinit usbhs_probe(struct platform_device *pdev) ret = usbhs_platform_call(priv, hardware_init, pdev); if (ret < 0) { dev_err(&pdev->dev, "platform prove failed.\n"); - goto probe_end_pipe_exit; + goto probe_end_mod_exit; } /* reset phy for connection */ @@ -372,10 +372,10 @@ static int __devinit usbhs_probe(struct platform_device *pdev) probe_end_call_remove: usbhs_platform_call(priv, hardware_exit, pdev); -probe_end_pipe_exit: - usbhs_pipe_remove(priv); probe_end_mod_exit: usbhs_mod_remove(priv); +probe_end_pipe_exit: + usbhs_pipe_remove(priv); probe_end_iounmap: iounmap(priv->base); probe_end_kfree: @@ -403,8 +403,8 @@ static int __devexit usbhs_remove(struct platform_device *pdev) pm_runtime_disable(&pdev->dev); usbhs_platform_call(priv, hardware_exit, pdev); - usbhs_pipe_remove(priv); usbhs_mod_remove(priv); + usbhs_pipe_remove(priv); iounmap(priv->base); kfree(priv); |