mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 19:21:31 -04:00
i2c-isa: Fail adding driver on attach_adapter error
i2c-isa: Fail adding driver on attach_adapter error Signed-off-by: David Hubbard <[email protected]> Signed-off-by: Jean Delvare <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
This commit is contained in:
parent
7d9db67feb
commit
8202632647
1 changed files with 8 additions and 3 deletions
|
|
@ -89,9 +89,14 @@ int i2c_isa_add_driver(struct i2c_driver *driver)
|
|||
dev_dbg(&isa_adapter.dev, "Driver %s registered\n", driver->driver.name);
|
||||
|
||||
/* Now look for clients */
|
||||
driver->attach_adapter(&isa_adapter);
|
||||
|
||||
return 0;
|
||||
res = driver->attach_adapter(&isa_adapter);
|
||||
if (res) {
|
||||
dev_err(&isa_adapter.dev,
|
||||
"Driver %s failed to attach adapter, unregistering\n",
|
||||
driver->driver.name);
|
||||
driver_unregister(&driver->driver);
|
||||
}
|
||||
return res;
|
||||
}
|
||||
|
||||
int i2c_isa_del_driver(struct i2c_driver *driver)
|
||||
|
|
|
|||
Loading…
Reference in a new issue