Re: [PATCH staging 3/6] et131x: fix error paths in et131x_pci_setup.

From: Mark Einon
Date: Mon Oct 24 2011 - 16:22:40 EST


On Sun, Oct 23, 2011 at 07:11:35PM +0200, Francois Romieu wrote:
> Wrong status code and unbalanced phy_connect.
>
> Signed-off-by: Francois Romieu <romieu@xxxxxxxxxxxxx>
> ---
[...]
> @@ -5448,9 +5424,11 @@ static int __devinit et131x_pci_setup(struct pci_dev *pdev,
> */
> pci_set_drvdata(pdev, netdev);
> pci_save_state(adapter->pdev);
> +out:
> + return rc;
>
> - return result;
> -
> +err_phy_disconnect:
> + phy_disconnect(adapter->phydev);
> err_mdio_unregister:
> mdiobus_unregister(adapter->mii_bus);
> err_mdio_free_irq:
> @@ -5468,8 +5446,7 @@ err_release_res:
> pci_release_regions(pdev);
> err_disable:
> pci_disable_device(pdev);
> -err_out:
> - return result;
> + goto out;
> }
>
> static SIMPLE_DEV_PM_OPS(et131x_pm_ops, et131x_suspend, et131x_resume);

Patch looks good, but again, could you remove the backwards jumping goto.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/