]> Git Repo - qemu.git/blobdiff - hw/i2c/exynos4210_i2c.c
i2c: Don't check return value from i2c_recv()
[qemu.git] / hw / i2c / exynos4210_i2c.c
index c96fa7d7be4382a081c73c8cd0c3fd25c9ffc15c..d154b05739594d0a74a6897dc30064d44f34532b 100644 (file)
@@ -106,16 +106,10 @@ static inline void exynos4210_i2c_raise_interrupt(Exynos4210I2CState *s)
 static void exynos4210_i2c_data_receive(void *opaque)
 {
     Exynos4210I2CState *s = (Exynos4210I2CState *)opaque;
-    int ret;
 
     s->i2cstat &= ~I2CSTAT_LAST_BIT;
     s->scl_free = false;
-    ret = i2c_recv(s->bus);
-    if (ret < 0 && (s->i2ccon & I2CCON_ACK_GEN)) {
-        s->i2cstat |= I2CSTAT_LAST_BIT;  /* Data is not acknowledged */
-    } else {
-        s->i2cds = ret;
-    }
+    s->i2cds = i2c_recv(s->bus);
     exynos4210_i2c_raise_interrupt(s);
 }
 
This page took 0.024097 seconds and 4 git commands to generate.