linux/drivers/infiniband
Wei Hu(Xavier) a74dc41d49 RDMA/hns: Check return value of kzalloc
When lp_qp_work is NULL, we should return ENOMEM.  In order to do so,
we had to make some upper layer functions return a value instead
of being void type so we can propagate the error up the stack.

This patch fixes the smatch error as below:
drivers/infiniband/hw/hns/hns_roce_hw_v1.c:918 hns_roce_v1_recreate_lp_qp()
error: potential null dereference 'lp_qp_work'.  (kzalloc returns null)

Signed-off-by: Wei Hu (Xavier) <xavier.huwei@huawei.com>
Signed-off-by: Lijun Ou <oulijun@huawei.com>
Signed-off-by: Shaobo Xu <xushaobo2@huawei.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
2017-09-29 12:04:45 -04:00
..
core IB/uverbs: clean up INIT_UDATA() macro usage 2017-09-27 08:54:19 -04:00
hw RDMA/hns: Check return value of kzalloc 2017-09-29 12:04:45 -04:00
sw IB: Move PCI dependency from root KConfig to HW's KConfigs 2017-09-27 08:54:19 -04:00
ulp IB/{ipoib, iser}: Consistent print format of vendor error 2017-09-29 11:18:56 -04:00
Kconfig IB: Move PCI dependency from root KConfig to HW's KConfigs 2017-09-27 08:54:19 -04:00
Makefile IB/rdmavt: Create module framework and handle driver registration 2016-03-10 20:37:04 -05:00