]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
staging: android: ion: tegra: Use devm_kcalloc instead of devm_kzalloc
authorAmitoj Kaur Chawla <amitoj1606@gmail.com>
Thu, 25 Feb 2016 13:55:04 +0000 (19:25 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 12 Mar 2016 06:09:09 +0000 (22:09 -0800)
commit0969e3d46b7cae0d52ba14e8901105d3cb421eb1
treebc1a71d042e3ae554191dd7482f6cfd5ed936705
parentdd28473385e78f94456fc66bd05c9d6db3febe13
staging: android: ion: tegra: Use devm_kcalloc instead of devm_kzalloc

Replace devm_kzalloc with devm_kcalloc to ensure there are no integer
overflows from the multiplication of a number * sizeof.

The following Coccinelle semantic patch was used to make this change:
//<smpl>
@@
expression dev,E1,E3;
type T;
@@
- devm_kzalloc(dev,E1*sizeof(T),E3)
+ devm_kcalloc(dev,E1,sizeof(T),E3)
//</smpl>

Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/android/ion/tegra/tegra_ion.c