Merge pull request #19738 from lixiaoy1/minor_fix

msg/async: use device before checking

Reviewed-by: Kefu Chai <kchai@redhat.com>
This commit is contained in:
Sage Weil 2018-01-02 09:20:18 -06:00 committed by GitHub
commit 34596a821d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -884,8 +884,8 @@ void Infiniband::init()
initialized = true;
device = device_list->get_device(device_name.c_str());
device->binding_port(cct, port_num);
assert(device);
device->binding_port(cct, port_num);
ib_physical_port = device->active_port->get_port_num();
pd = new ProtectionDomain(cct, device);
assert(NetHandler(cct).set_nonblock(device->ctxt->async_fd) == 0);