ntb: fix possible NULL dereference
authorSudip Mukherjee <sudipm.mukherjee@gmail.com>
Thu, 10 Mar 2016 12:21:11 +0000 (17:51 +0530)
committerJon Mason <jdmason@kudzu.us>
Fri, 18 Mar 2016 00:52:15 +0000 (20:52 -0400)
commit2572c7fb4e4b941af9a0206ac8093d362ae6d371
tree108abf8ced1b14f933e9415f48df1dbb99c2bac6
parentee5f750f1c9d675028ecedc5439b7171f6647cb8
ntb: fix possible NULL dereference

kmalloc can fail and we should check for NULL before using the pointer
returned by kmalloc.

Signed-off-by: Sudip Mukherjee <sudip.mukherjee@codethink.co.uk>
Acked-by: Dave Jiang <dave.jiang@intel.com>
Signed-off-by: Jon Mason <jdmason@kudzu.us>
drivers/ntb/test/ntb_perf.c