aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/base/bus.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/base/bus.c')
-rw-r--r--drivers/base/bus.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/base/bus.c b/drivers/base/bus.c
index aea579365f6d..a377b65ba328 100644
--- a/drivers/base/bus.c
+++ b/drivers/base/bus.c
@@ -681,7 +681,7 @@ int bus_add_driver(struct device_driver *drv)
681 kobject_uevent(&priv->kobj, KOBJ_ADD); 681 kobject_uevent(&priv->kobj, KOBJ_ADD);
682 return error; 682 return error;
683out_unregister: 683out_unregister:
684 kobject_unregister(&priv->kobj); 684 kobject_put(&priv->kobj);
685out_put_bus: 685out_put_bus:
686 bus_put(bus); 686 bus_put(bus);
687 return error; 687 return error;
@@ -708,7 +708,7 @@ void bus_remove_driver(struct device_driver * drv)
708 pr_debug("bus: '%s': remove driver %s\n", drv->bus->name, drv->name); 708 pr_debug("bus: '%s': remove driver %s\n", drv->bus->name, drv->name);
709 driver_detach(drv); 709 driver_detach(drv);
710 module_remove_driver(drv); 710 module_remove_driver(drv);
711 kobject_unregister(&drv->p->kobj); 711 kobject_put(&drv->p->kobj);
712 bus_put(drv->bus); 712 bus_put(drv->bus);
713} 713}
714 714