These changes are the raw update to linux-4.4.6-rt14. Kernel sources
[kvmfornfv.git] / kernel / drivers / i2c / busses / i2c-octeon.c
index 6e75e01..32914ab 100644 (file)
@@ -200,7 +200,7 @@ static int octeon_i2c_test_iflg(struct octeon_i2c *i2c)
  */
 static int octeon_i2c_wait(struct octeon_i2c *i2c)
 {
-       int result;
+       long result;
 
        octeon_i2c_int_enable(i2c);
 
@@ -210,10 +210,7 @@ static int octeon_i2c_wait(struct octeon_i2c *i2c)
 
        octeon_i2c_int_disable(i2c);
 
-       if (result < 0) {
-               dev_dbg(i2c->dev, "%s: wait interrupted\n", __func__);
-               return result;
-       } else if (result == 0) {
+       if (result == 0) {
                dev_dbg(i2c->dev, "%s: timeout\n", __func__);
                return -ETIMEDOUT;
        }