]> git.baikalelectronics.ru Git - kernel.git/commit
Staging: rdma: ipath: Use kcalloc instead of kzalloc to allocate array
authorShraddha Barke <shraddha.6596@gmail.com>
Fri, 9 Oct 2015 15:33:27 +0000 (21:03 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 13 Oct 2015 03:35:21 +0000 (20:35 -0700)
commitb84112200e6db94180e9970df8dc203d6d606114
tree2f1d3f1d42c2ae25aab1ef84e53d5865fc5c9e0b
parentbae7851bd3589a25e38a550f2ca947a4f2bb5eb1
Staging: rdma: ipath: 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/ipath/ipath_init_chip.c
drivers/staging/rdma/ipath/ipath_qp.c
drivers/staging/rdma/ipath/ipath_verbs.c