aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/i2c/i2c-core.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/i2c/i2c-core.c b/drivers/i2c/i2c-core.c
index e45bb2838f42..5e249d758828 100644
--- a/drivers/i2c/i2c-core.c
+++ b/drivers/i2c/i2c-core.c
@@ -300,6 +300,14 @@ void i2c_unregister_device(struct i2c_client *client)
300 return; 300 return;
301 } 301 }
302 302
303 if (adapter->client_unregister) {
304 if (adapter->client_unregister(client)) {
305 dev_warn(&client->dev,
306 "client_unregister [%s] failed\n",
307 client->name);
308 }
309 }
310
303 mutex_lock(&adapter->clist_lock); 311 mutex_lock(&adapter->clist_lock);
304 list_del(&client->list); 312 list_del(&client->list);
305 mutex_unlock(&adapter->clist_lock); 313 mutex_unlock(&adapter->clist_lock);