diff options
| author | Wei Hu(Xavier) <xavier.huwei@huawei.com> | 2017-09-29 23:10:09 +0800 |
|---|---|---|
| committer | Doug Ledford <dledford@redhat.com> | 2017-09-29 12:04:45 -0400 |
| commit | a74dc41d49959e46ca356a388fab3a23a4b593cd (patch) | |
| tree | 7448cf0db29a1d165a887522ba74ee2c60b44ad9 /tools/perf/scripts/python/bin/stackcollapse-record | |
| parent | f44c863be282f575becb1aacb69fd42f8ea53c6d (diff) | |
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>
Diffstat (limited to 'tools/perf/scripts/python/bin/stackcollapse-record')
0 files changed, 0 insertions, 0 deletions
