aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'drivers')
-rw-r--r--drivers/misc/apds9802als.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/misc/apds9802als.c b/drivers/misc/apds9802als.c
index 0314773f6db3..94923d259910 100644
--- a/drivers/misc/apds9802als.c
+++ b/drivers/misc/apds9802als.c
@@ -68,7 +68,7 @@ static int als_wait_for_data_ready(struct device *dev)
68 ret = i2c_smbus_read_byte_data(client, 0x86); 68 ret = i2c_smbus_read_byte_data(client, 0x86);
69 } while (!(ret & 0x80) && retry--); 69 } while (!(ret & 0x80) && retry--);
70 70
71 if (!retry) { 71 if (retry < 0) {
72 dev_warn(dev, "timeout waiting for data ready\n"); 72 dev_warn(dev, "timeout waiting for data ready\n");
73 return -ETIMEDOUT; 73 return -ETIMEDOUT;
74 } 74 }