nvmf: Improve error handling in spdk_nvmf_transport_poll_group_create
At least in case of RDMA transport, poll_group_create (spdk_nvmf_rdma_poll_group_create) can return error (NULL). Change-Id: If1576b3515e7f9ede76af08bfa6b1c8399dcda09 Signed-off-by: Sasha Kotchubievsky <sashakot@mellanox.com> Signed-off-by: Evgeniy Kochetov <evgeniik@mellanox.com> Reviewed-on: https://review.gerrithub.io/436887 (master) Reviewed-on: https://review.gerrithub.io/437349 Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com> Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Changpeng Liu <changpeng.liu@intel.com> Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com> Reviewed-by: Ben Walker <benjamin.walker@intel.com>
This commit is contained in:
parent
8ca38e04b1
commit
59c5be6231
@ -1,8 +1,8 @@
|
||||
/*-
|
||||
* BSD LICENSE
|
||||
*
|
||||
* Copyright (c) Intel Corporation.
|
||||
* All rights reserved.
|
||||
* Copyright (c) Intel Corporation. All rights reserved.
|
||||
* Copyright (c) 2018 Mellanox Technologies LTD. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
@ -140,6 +140,9 @@ spdk_nvmf_transport_poll_group_create(struct spdk_nvmf_transport *transport)
|
||||
struct spdk_nvmf_transport_poll_group *group;
|
||||
|
||||
group = transport->ops->poll_group_create(transport);
|
||||
if (!group) {
|
||||
return NULL;
|
||||
}
|
||||
group->transport = transport;
|
||||
|
||||
return group;
|
||||
|
Loading…
Reference in New Issue
Block a user