Re: [PATCH staging 6/6] et131x: uncloak PCIe capabilities.
From: Mark Einon
Date: Mon Oct 24 2011 - 15:57:31 EST
On Sun, Oct 23, 2011 at 07:12:14PM +0200, Francois Romieu wrote:
> FIXME: it should be possible to get rid of ET1310_PCI_L0L1LATENCY as well.
> Signed-off-by: Francois Romieu <romieu@xxxxxxxxxxxxx>
> drivers/staging/et131x/et131x.c | 53 ++++++++++++++++++++++----------------
> 1 files changed, 31 insertions(+), 22 deletions(-)
> diff --git a/drivers/staging/et131x/et131x.c b/drivers/staging/et131x/et131x.c
> index 79ca1d3..2a0b794 100644
> --- a/drivers/staging/et131x/et131x.c
> +++ b/drivers/staging/et131x/et131x.c
> - if (et131x_init_eeprom(adapter) < 0)
> - return -EIO;
> + rc = et131x_init_eeprom(adapter);
> + if (rc < 0)
> + goto out;
> memcpy(adapter->addr, adapter->rom_addr, ETH_ALEN);
> - return 0;
> + return rc;
> + rc = -EIO;
> + goto out;
The PCIe changes are good, however I think using gotos here doesn't add anything as there's no difficult locking to navigate and makes the code harder to read.
both out: and err_out: are used to return an error, and the backwards jumping goto makes me a bit uncomfortable. Could you respin with just the PCIe changes?
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/