Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 23253
b: refs/heads/master
c: 7eebcb7
h: refs/heads/master
i:
  23251: 9d414ff
v: v3
  • Loading branch information
Jean Delvare authored and Greg Kroah-Hartman committed Mar 23, 2006
1 parent f3d6ebd commit 138ca01
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: fabddcd49d8b4fca40ce346f701853888d98b5d2
refs/heads/master: 7eebcb7c0f4d45168265bdca79cc3e609d68d436
11 changes: 5 additions & 6 deletions trunk/drivers/i2c/i2c-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -288,18 +288,18 @@ int i2c_register_driver(struct module *owner, struct i2c_driver *driver)
{
struct list_head *item;
struct i2c_adapter *adapter;
int res = 0;

mutex_lock(&core_lists);
int res;

/* add the driver to the list of i2c drivers in the driver core */
driver->driver.owner = owner;
driver->driver.bus = &i2c_bus_type;

res = driver_register(&driver->driver);
if (res)
goto out_unlock;
return res;

mutex_lock(&core_lists);

list_add_tail(&driver->list,&drivers);
pr_debug("i2c-core: driver [%s] registered\n", driver->driver.name);

Expand All @@ -311,9 +311,8 @@ int i2c_register_driver(struct module *owner, struct i2c_driver *driver)
}
}

out_unlock:
mutex_unlock(&core_lists);
return res;
return 0;
}
EXPORT_SYMBOL(i2c_register_driver);

Expand Down

0 comments on commit 138ca01

Please sign in to comment.