]> git.baikalelectronics.ru Git - kernel.git/commit
Staging: rdma: hfi1: Use kcalloc instead of kzalloc to allocate array
authorShraddha Barke <shraddha.6596@gmail.com>
Fri, 9 Oct 2015 15:33:26 +0000 (21:03 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 13 Oct 2015 03:35:21 +0000 (20:35 -0700)
commitb996a0bfe8a924bd780b4da20553f4ac9c320cc1
treefea5c8109dcbbdebf27632bf57c560960fbe7ebb
parent691388f72f91236347ca2a062a1a2e2ad1c45000
Staging: rdma: hfi1: Use kcalloc instead of kzalloc to allocate array

The advantage of kcalloc is, that will prevent integer overflows which
could result from the multiplication of number of elements and size and
it is also a bit nicer to read.

Signed-off-by: Shraddha Barke <shraddha.6596@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rdma/hfi1/diag.c
drivers/staging/rdma/hfi1/init.c
drivers/staging/rdma/hfi1/user_sdma.c