|
@@ -494,8 +494,11 @@ static int cm_init_av_by_path(struct sa_path_rec *path, struct cm_av *av,
|
|
|
return ret;
|
|
|
|
|
|
av->port = port;
|
|
|
- ib_init_ah_from_path(cm_dev->ib_device, port->port_num, path,
|
|
|
- &av->ah_attr);
|
|
|
+ ret = ib_init_ah_from_path(cm_dev->ib_device, port->port_num, path,
|
|
|
+ &av->ah_attr);
|
|
|
+ if (ret)
|
|
|
+ return ret;
|
|
|
+
|
|
|
av->timeout = path->packet_life_time + 1;
|
|
|
|
|
|
spin_lock_irqsave(&cm.lock, flags);
|