/* 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);
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 */
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:
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);