diff options
Diffstat (limited to 'drivers/clk/clk.c')
| -rw-r--r-- | drivers/clk/clk.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/drivers/clk/clk.c b/drivers/clk/clk.c index 85d2f2481acf..5789cd93bfc2 100644 --- a/drivers/clk/clk.c +++ b/drivers/clk/clk.c @@ -4121,7 +4121,7 @@ static struct clk *alloc_clk(struct clk_core *core, const char *dev_id, { struct clk *clk; - clk = kzalloc(sizeof(*clk), GFP_KERNEL); + clk = kzalloc_obj(*clk, GFP_KERNEL); if (!clk) return ERR_PTR(-ENOMEM); @@ -4238,7 +4238,7 @@ static int clk_core_populate_parent_map(struct clk_core *core, * Avoid unnecessary string look-ups of clk_core's possible parents by * having a cache of names/clk_hw pointers to clk_core pointers. */ - parents = kcalloc(num_parents, sizeof(*parents), GFP_KERNEL); + parents = kzalloc_objs(*parents, num_parents, GFP_KERNEL); core->parents = parents; if (!parents) return -ENOMEM; @@ -4328,7 +4328,7 @@ __clk_register(struct device *dev, struct device_node *np, struct clk_hw *hw) */ hw->init = NULL; - core = kzalloc(sizeof(*core), GFP_KERNEL); + core = kzalloc_obj(*core, GFP_KERNEL); if (!core) { ret = -ENOMEM; goto fail_out; @@ -4813,7 +4813,7 @@ int clk_notifier_register(struct clk *clk, struct notifier_block *nb) goto found; /* if clk wasn't in the notifier list, allocate new clk_notifier */ - cn = kzalloc(sizeof(*cn), GFP_KERNEL); + cn = kzalloc_obj(*cn, GFP_KERNEL); if (!cn) goto out; @@ -5009,7 +5009,7 @@ int of_clk_add_provider(struct device_node *np, if (!np) return 0; - cp = kzalloc(sizeof(*cp), GFP_KERNEL); + cp = kzalloc_obj(*cp, GFP_KERNEL); if (!cp) return -ENOMEM; @@ -5051,7 +5051,7 @@ int of_clk_add_hw_provider(struct device_node *np, if (!np) return 0; - cp = kzalloc(sizeof(*cp), GFP_KERNEL); + cp = kzalloc_obj(*cp, GFP_KERNEL); if (!cp) return -ENOMEM; @@ -5548,7 +5548,7 @@ void __init of_clk_init(const struct of_device_id *matches) if (!of_device_is_available(np)) continue; - parent = kzalloc(sizeof(*parent), GFP_KERNEL); + parent = kzalloc_obj(*parent, GFP_KERNEL); if (!parent) { list_for_each_entry_safe(clk_provider, next, &clk_provider_list, node) { |
