Merge branch 'stable/bug-fixes-rc1' of git://git.kernel.org/pub/scm/linux/kernel...
[pandora-kernel.git] / drivers / macintosh / therm_pm72.c
index 2e041fd..f3a29f2 100644 (file)
@@ -443,7 +443,7 @@ static int fan_read_reg(int reg, unsigned char *buf, int nb)
        tries = 0;
        for (;;) {
                nr = i2c_master_recv(fcu, buf, nb);
-               if (nr > 0 || (nr < 0 && nr != ENODEV) || tries >= 100)
+               if (nr > 0 || (nr < 0 && nr != -ENODEV) || tries >= 100)
                        break;
                msleep(10);
                ++tries;
@@ -464,7 +464,7 @@ static int fan_write_reg(int reg, const unsigned char *ptr, int nb)
        tries = 0;
        for (;;) {
                nw = i2c_master_send(fcu, buf, nb);
-               if (nw > 0 || (nw < 0 && nw != EIO) || tries >= 100)
+               if (nw > 0 || (nw < 0 && nw != -EIO) || tries >= 100)
                        break;
                msleep(10);
                ++tries;