staging: android: Use devm_kcalloc instead of devm_kzalloc
authorAmitoj Kaur Chawla <amitoj1606@gmail.com>
Thu, 25 Feb 2016 14:51:20 +0000 (20:21 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 12 Mar 2016 06:09:09 +0000 (22:09 -0800)
commit0103fe20a7dd343c43bec6215e01cd6bedddd5eb
tree7c83aacc15be6008d89ad01e0006cca704af78ed
parent9f1c427d8093a97f356612c933f12f3b9f0bc9de
staging: android: 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,E2,E3;
@@
- devm_kzalloc(dev,E1*sizeof(E2),E3)
+ devm_kcalloc(dev,E1,sizeof(E2),E3)
//</smpl>

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