Skip to content

Commit 19050da

Browse files
kennethlee33tmlind
authored andcommitted
ARM: OMAP2+: hwmod: Use kzalloc for allocating only one element
Use kzalloc(...) rather than kcalloc(1, ...) because the number of elements we are specifying in this case is 1, so kzalloc would accomplish the same thing and we can simplify. Signed-off-by: Kenneth Lee <klee33@uw.edu> Message-Id: <20220809072050.1733996-1-klee33@uw.edu> Signed-off-by: Tony Lindgren <tony@atomide.com>
1 parent 89e9905 commit 19050da

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

arch/arm/mach-omap2/omap_hwmod.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3454,7 +3454,7 @@ static int omap_hwmod_allocate_module(struct device *dev, struct omap_hwmod *oh,
34543454
}
34553455

34563456
if (list_empty(&oh->slave_ports)) {
3457-
oi = kcalloc(1, sizeof(*oi), GFP_KERNEL);
3457+
oi = kzalloc(sizeof(*oi), GFP_KERNEL);
34583458
if (!oi)
34593459
goto out_free_class;
34603460

0 commit comments

Comments
 (0)