diff options
Diffstat (limited to 'drivers/infiniband')
-rw-r--r-- | drivers/infiniband/hw/cxgb3/iwch_provider.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/drivers/infiniband/hw/cxgb3/iwch_provider.c b/drivers/infiniband/hw/cxgb3/iwch_provider.c index 6895523779d0..03cfaecc3bb7 100644 --- a/drivers/infiniband/hw/cxgb3/iwch_provider.c +++ b/drivers/infiniband/hw/cxgb3/iwch_provider.c | |||
@@ -1199,11 +1199,14 @@ static int iwch_query_port(struct ib_device *ibdev, | |||
1199 | props->state = IB_PORT_DOWN; | 1199 | props->state = IB_PORT_DOWN; |
1200 | else { | 1200 | else { |
1201 | inetdev = in_dev_get(netdev); | 1201 | inetdev = in_dev_get(netdev); |
1202 | if (inetdev->ifa_list) | 1202 | if (inetdev) { |
1203 | props->state = IB_PORT_ACTIVE; | 1203 | if (inetdev->ifa_list) |
1204 | else | 1204 | props->state = IB_PORT_ACTIVE; |
1205 | else | ||
1206 | props->state = IB_PORT_INIT; | ||
1207 | in_dev_put(inetdev); | ||
1208 | } else | ||
1205 | props->state = IB_PORT_INIT; | 1209 | props->state = IB_PORT_INIT; |
1206 | in_dev_put(inetdev); | ||
1207 | } | 1210 | } |
1208 | 1211 | ||
1209 | props->port_cap_flags = | 1212 | props->port_cap_flags = |