Tag: 0103fe20a7dd343c43bec6215e01cd6bedddd5eb

staging: android: Use devm_kcalloc instead of devm_kzalloc

Author: Amitoj Kaur Chawla <amitoj1606@gmail.com> 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: // @@ expression dev,E1,E2,E3; @@ – devm_kzalloc(dev,E1*sizeof(E2),E3) + devm_kcalloc(dev,E1,sizeof(E2),E3) // Signed-off-by: Amitoj Kaur Chawla Signed-off-by: Greg Kroah-Hartman — drivers/staging/android/timed_gpio.c | …

Continue reading