aboutsummaryrefslogtreecommitdiffstats
path: root/net/rds/ib.c
diff options
context:
space:
mode:
authorWolfgang Wiedmeyer <wolfgit@wiedmeyer.de>2015-10-24 02:08:33 +0200
committerWolfgang Wiedmeyer <wolfgit@wiedmeyer.de>2015-10-24 02:08:33 +0200
commitf0b9ad5690ed96f95d91ca19fba2fb2894bae6f0 (patch)
treed1b649e6f97ac0f1fc9864a296021c71cf69cd21 /net/rds/ib.c
parent272e77de798362c31e6452a46a0e7d5b6aaeb550 (diff)
downloadkernel_samsung_smdk4412-f0b9ad5690ed96f95d91ca19fba2fb2894bae6f0.zip
kernel_samsung_smdk4412-f0b9ad5690ed96f95d91ca19fba2fb2894bae6f0.tar.gz
kernel_samsung_smdk4412-f0b9ad5690ed96f95d91ca19fba2fb2894bae6f0.tar.bz2
update network codemigrate_3.2
Diffstat (limited to 'net/rds/ib.c')
-rw-r--r--net/rds/ib.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/net/rds/ib.c b/net/rds/ib.c
index 3b83086..ba2dffe 100644
--- a/net/rds/ib.c
+++ b/net/rds/ib.c
@@ -38,6 +38,7 @@
#include <linux/if_arp.h>
#include <linux/delay.h>
#include <linux/slab.h>
+#include <linux/module.h>
#include "rds.h"
#include "ib.h"
@@ -337,7 +338,8 @@ static int rds_ib_laddr_check(__be32 addr)
ret = rdma_bind_addr(cm_id, (struct sockaddr *)&sin);
/* due to this, we will claim to support iWARP devices unless we
check node_type. */
- if (ret || cm_id->device->node_type != RDMA_NODE_IB_CA)
+ if (ret || !cm_id->device ||
+ cm_id->device->node_type != RDMA_NODE_IB_CA)
ret = -EADDRNOTAVAIL;
rdsdebug("addr %pI4 ret %d node type %d\n",