summaryrefslogtreecommitdiff
path: root/drivers/base/swnode.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/base/swnode.c')
-rw-r--r--drivers/base/swnode.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/base/swnode.c b/drivers/base/swnode.c
index 16a8301c25d6..6fcb0c4f13ff 100644
--- a/drivers/base/swnode.c
+++ b/drivers/base/swnode.c
@@ -332,7 +332,7 @@ property_entries_dup(const struct property_entry *properties)
while (properties[n].name)
n++;
- p = kcalloc(n + 1, sizeof(*p), GFP_KERNEL);
+ p = kzalloc_objs(*p, n + 1, GFP_KERNEL);
if (!p)
return ERR_PTR(-ENOMEM);
@@ -758,7 +758,7 @@ static struct software_node *software_node_alloc(const struct property_entry *pr
if (IS_ERR(props))
return ERR_CAST(props);
- node = kzalloc(sizeof(*node), GFP_KERNEL);
+ node = kzalloc_obj(*node, GFP_KERNEL);
if (!node) {
property_entries_free(props);
return ERR_PTR(-ENOMEM);
@@ -805,7 +805,7 @@ swnode_register(const struct software_node *node, struct swnode *parent,
struct swnode *swnode;
int ret;
- swnode = kzalloc(sizeof(*swnode), GFP_KERNEL);
+ swnode = kzalloc_obj(*swnode, GFP_KERNEL);
if (!swnode)
return ERR_PTR(-ENOMEM);