Re: [PATCH RESEND v2] i2c-eg20t: support new device OKISEMICONDUCTOR ML7213 IOH

From: Dan Carpenter
Date: Mon Feb 28 2011 - 06:52:51 EST


On Mon, Feb 28, 2011 at 03:54:32PM +0900, Tomoya MORINAGA wrote:
> - ret = i2c_add_adapter(&(adap_info->pch_data.pch_adapter));
> + pch_adap->dev.parent = &pdev->dev;
>
> - if (ret) {
> - pch_pci_err(pdev, "i2c_add_adapter FAILED\n");
> - goto err_i2c_add_adapter;
> - }
> + ret = i2c_add_adapter(pch_adap);
> + if (ret) {
> + pch_pci_err(pdev, "i2c_add_adapter[ch:%d] FAILED\n", i);
> + goto err_i2c_add_adapter;

I think goto err_request_irq was intended here. On a side note, it's
always better to name goto destinations after the destination instead
of the starting point. In this case, we have two gotos to one
destination and the label err_request_irq makes no sense.

regards,
dan carpenter

--
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/