aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/base
diff options
context:
space:
mode:
authorSebastian Ott <sebott@linux.vnet.ibm.com>2012-07-17 04:39:10 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-07-17 13:40:23 -0400
commita14af325641794d1ce8e676e9c4967342349195c (patch)
tree5f59e8d8b1d224651895e2fdad3172b15415bdd2 /drivers/base
parentdb1b9037424b8219449a6754e9b7e97b0523c426 (diff)
driver core: don't trigger uevent after failure
Do not send the uevent if driver_add_groups failed. Reported-by: Ming Lei <ming.lei@canonical.com> Signed-off-by: Sebastian Ott <sebott@linux.vnet.ibm.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/base')
-rw-r--r--drivers/base/driver.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/base/driver.c b/drivers/base/driver.c
index 1b500d6fcc2e..974e301a1ef0 100644
--- a/drivers/base/driver.c
+++ b/drivers/base/driver.c
@@ -185,9 +185,10 @@ int driver_register(struct device_driver *drv)
185 if (ret) 185 if (ret)
186 return ret; 186 return ret;
187 ret = driver_add_groups(drv, drv->groups); 187 ret = driver_add_groups(drv, drv->groups);
188 if (ret) 188 if (ret) {
189 bus_remove_driver(drv); 189 bus_remove_driver(drv);
190 190 return ret;
191 }
191 kobject_uevent(&drv->p->kobj, KOBJ_ADD); 192 kobject_uevent(&drv->p->kobj, KOBJ_ADD);
192 193
193 return ret; 194 return ret;