dest->ah = ibv_create_ah(ep->port->dev->pd, &dest->av);
if (!dest->ah) {
acm_log(0, "ERROR - unable to create ah\n");
- goto err1;
+ goto err2;
}
ret = ibv_attach_mcast(ep->qp, &mc_rec->mgid, mc_rec->mlid);
if (ret) {
acm_log(0, "ERROR - unable to attach QP to multicast group\n");
- goto err2;
+ goto err3;
}
}
acm_log(1, "join successful\n");
lock_release(&ep->lock);
return;
-err2:
+err3:
ibv_destroy_ah(dest->ah);
dest->ah = NULL;
-err1:
+err2:
dest->state = ACM_INIT;
+err1:
lock_release(&ep->lock);
}