Hi,
Some minor comments/questions:
On Wed, Jan 23, 2013 at 12:23:07PM +0200, Felipe Balbi wrote:
> @@ -639,31 +630,37 @@ static int omap_i2c_xfer_msg(struct i2c_adapter *adap,
> dev_err(dev->dev, "controller timed out\n");
> omap_i2c_reset(dev);
> __omap_i2c_init(dev);
> - return -ETIMEDOUT;
> + ret = -ETIMEDOUT;
> + goto out;
> }
>
> - if (likely(!dev->cmd_err))
> - return 0;
> -
> /* We have an error */
> if (dev->cmd_err & (OMAP_I2C_STAT_AL | OMAP_I2C_STAT_ROVR |
> OMAP_I2C_STAT_XUDF)) {
> omap_i2c_reset(dev);
> __omap_i2c_init(dev);
> - return -EIO;
> + ret = -EIO;
> + goto out;
Why change return to goto on these paths? If you reset and re-initialize
the controller, I think it's unlikely that omap_i2c_wait_for_ardy()
will ever succeed?
A.
--
To unsubscribe from this list: send the line "unsubscribe linux-i2c" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html