File tree Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -340,11 +340,15 @@ static struct ib_ports_pkeys *get_new_pps(const struct ib_qp *qp,
340
340
return NULL ;
341
341
342
342
if (qp_attr_mask & IB_QP_PORT )
343
- new_pps -> main .port_num =
344
- (qp_pps ) ? qp_pps -> main .port_num : qp_attr -> port_num ;
343
+ new_pps -> main .port_num = qp_attr -> port_num ;
344
+ else if (qp_pps )
345
+ new_pps -> main .port_num = qp_pps -> main .port_num ;
346
+
345
347
if (qp_attr_mask & IB_QP_PKEY_INDEX )
346
- new_pps -> main .pkey_index = (qp_pps ) ? qp_pps -> main .pkey_index :
347
- qp_attr -> pkey_index ;
348
+ new_pps -> main .pkey_index = qp_attr -> pkey_index ;
349
+ else if (qp_pps )
350
+ new_pps -> main .pkey_index = qp_pps -> main .pkey_index ;
351
+
348
352
if ((qp_attr_mask & IB_QP_PKEY_INDEX ) && (qp_attr_mask & IB_QP_PORT ))
349
353
new_pps -> main .state = IB_PORT_PKEY_VALID ;
350
354
You can’t perform that action at this time.
0 commit comments