diff options
author | JB Van Puyvelde <jbvanpuyvelde@gmail.com> | 2017-05-11 22:58:56 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2017-05-15 07:41:59 +0200 |
commit | 03d261deea9d0b8fbb908d7f1f29f26fd272984d (patch) | |
tree | f37022dea5581e6d6130634bc61b60ad2ed47499 | |
parent | 3036d0e226b04f10fbce1fd5263c735e4c1d9ffa (diff) | |
download | linux-03d261deea9d0b8fbb908d7f1f29f26fd272984d.tar.bz2 |
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 <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>
-rw-r--r-- | drivers/staging/greybus/power_supply.c | 2 |
1 files changed, 1 insertions, 1 deletions
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); |