mirror of https://gitee.com/openkylin/linux.git
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>
This commit is contained in:
parent
3036d0e226
commit
03d261deea
|
@ -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);
|
||||
|
||||
|
|
Loading…
Reference in New Issue