aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'drivers')
-rw-r--r--drivers/i2c/i2c-core.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/i2c/i2c-core.c b/drivers/i2c/i2c-core.c
index ad68ac00d910..2f0bc9529376 100644
--- a/drivers/i2c/i2c-core.c
+++ b/drivers/i2c/i2c-core.c
@@ -500,9 +500,7 @@ int i2c_use_client(struct i2c_client *client)
500 return ret; 500 return ret;
501 501
502 if (client->flags & I2C_CLIENT_ALLOW_USE) { 502 if (client->flags & I2C_CLIENT_ALLOW_USE) {
503 if (client->flags & I2C_CLIENT_ALLOW_MULTIPLE_USE) 503 if (client->usage_count > 0)
504 client->usage_count++;
505 else if (client->usage_count > 0)
506 goto busy; 504 goto busy;
507 else 505 else
508 client->usage_count++; 506 client->usage_count++;