diff options
| author | Guoqing Jiang <[email protected]> | 2020-12-17 15:19:10 +0100 |
|---|---|---|
| committer | Jason Gunthorpe <[email protected]> | 2021-01-15 15:25:09 -0400 |
| commit | eab098246625e91c1cbd6e8f75b09e4c9c28a9fc (patch) | |
| tree | 405abc47e52ef1379cdc764b9715aba52ff82000 /tools/perf/scripts/python | |
| parent | 8537f2de6519945890a2b0f3739b23f32b5c0a89 (diff) | |
RDMA/rtrs-clt: Refactor the failure cases in alloc_clt
Make all failure cases go to the common path to avoid duplicate code.
And some issued existed before.
1. clt need to be freed to avoid memory leak.
2. return ERR_PTR(-ENOMEM) if kobject_create_and_add fails, because
rtrs_clt_open checks the return value of by call "IS_ERR(clt)".
Fixes: 6a98d71daea1 ("RDMA/rtrs: client: main functionality")
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Guoqing Jiang <[email protected]>
Reviewed-by: Md Haris Iqbal <[email protected]>
Signed-off-by: Jack Wang <[email protected]>
Signed-off-by: Jason Gunthorpe <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions