On 04/16/2015 02:43 PM, Hal Rosenstock wrote: [snip] >> + >> + count++; >> } >> + >> + if (!count) { >> + device_unregister(cm_dev->device); >> + kfree(cm_dev); >> + return; > > Nit: alternatively, this could be goto at end of this routine where > there is same 2 calls. I think Jason made this comment on earlier set of > these patches. Thanks for the notify, I guess I missed it, my bad :-P Will be "goto free" in next version. Regards, Michael Wang > > -- Hal > >> + } >> + >> ib_set_client_data(ib_device, &cm_client, cm_dev); >> >> write_lock_irqsave(&cm.device_lock, flags); >> @@ -3825,6 +3835,9 @@ error1: >> port_modify.set_port_cap_mask = 0; >> port_modify.clr_port_cap_mask = IB_PORT_CM_SUP; >> while (--i) { >> + if (!rdma_ib_or_iboe(ib_device, i)) >> + continue; >> + >> port = cm_dev->port[i-1]; >> ib_modify_port(ib_device, port->port_num, 0, &port_modify); >> ib_unregister_mad_agent(port->mad_agent); >> @@ -3853,6 +3866,9 @@ static void cm_remove_one(struct ib_device *ib_device) >> write_unlock_irqrestore(&cm.device_lock, flags); >> >> for (i = 1; i <= ib_device->phys_port_cnt; i++) { >> + if (!rdma_ib_or_iboe(ib_device, i)) >> + continue; >> + >> port = cm_dev->port[i-1]; >> ib_modify_port(ib_device, port->port_num, 0, &port_modify); >> ib_unregister_mad_agent(port->mad_agent); > -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html