summaryrefslogtreecommitdiff
path: root/drivers/base/bus.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/base/bus.c')
-rw-r--r--drivers/base/bus.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/base/bus.c b/drivers/base/bus.c
index 9eb7771706f0..5745f51f5901 100644
--- a/drivers/base/bus.c
+++ b/drivers/base/bus.c
@@ -696,7 +696,7 @@ int bus_add_driver(struct device_driver *drv)
*/
pr_debug("bus: '%s': add driver %s\n", sp->bus->name, drv->name);
- priv = kzalloc(sizeof(*priv), GFP_KERNEL);
+ priv = kzalloc_obj(*priv, GFP_KERNEL);
if (!priv) {
error = -ENOMEM;
goto out_put_bus;
@@ -897,7 +897,7 @@ int bus_register(const struct bus_type *bus)
struct kobject *bus_kobj;
struct lock_class_key *key;
- priv = kzalloc(sizeof(struct subsys_private), GFP_KERNEL);
+ priv = kzalloc_obj(struct subsys_private, GFP_KERNEL);
if (!priv)
return -ENOMEM;
@@ -1263,7 +1263,7 @@ static int subsys_register(const struct bus_type *subsys,
goto err_sp;
}
- dev = kzalloc(sizeof(struct device), GFP_KERNEL);
+ dev = kzalloc_obj(struct device, GFP_KERNEL);
if (!dev) {
err = -ENOMEM;
goto err_dev;