Re: [PATCH 5/6] i2c: omap: wait for transfer completion before sending STP bit

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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-omap" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Arm (vger)]     [ARM Kernel]     [ARM MSM]     [Linux Tegra]     [Linux WPAN Networking]     [Linux Wireless Networking]     [Maemo Users]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux