staging: greybus: power_supply: replace kzalloc by kcalloc
authorJB Van Puyvelde <jbvanpuyvelde@gmail.com>
Thu, 11 May 2017 20:58:56 +0000 (22:58 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 15 May 2017 05:41:59 +0000 (07:41 +0200)
According to checkpatch.pl, kcalloc should be preferred to kzalloc with
multiply.

Signed-off-by: JB Van Puyvelde <jbvanpuyvelde@gmail.com>
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
Reviewed-by: Rui Miguel Silva <rmfrfs@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/greybus/power_supply.c

index e85c988..20cac20 100644 (file)
@@ -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);