From 03d261deea9d0b8fbb908d7f1f29f26fd272984d Mon Sep 17 00:00:00 2001 From: JB Van Puyvelde Date: Thu, 11 May 2017 22:58:56 +0200 Subject: staging: greybus: power_supply: replace kzalloc by kcalloc According to checkpatch.pl, kcalloc should be preferred to kzalloc with multiply. Signed-off-by: JB Van Puyvelde Acked-by: Viresh Kumar Reviewed-by: Rui Miguel Silva Signed-off-by: Greg Kroah-Hartman --- drivers/staging/greybus/power_supply.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/greybus/power_supply.c b/drivers/staging/greybus/power_supply.c index e85c988b7034..20cac20518d7 100644 --- a/drivers/staging/greybus/power_supply.c +++ b/drivers/staging/greybus/power_supply.c @@ -944,7 +944,7 @@ static int gb_power_supplies_setup(struct gb_power_supplies *supplies) if (ret < 0) goto out; - supplies->supply = kzalloc(supplies->supplies_count * + supplies->supply = kcalloc(supplies->supplies_count, sizeof(struct gb_power_supply), GFP_KERNEL); -- cgit v1.2.3