summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorWei Yongjun <yongjun_wei@trendmicro.com.cn>2012-09-07 06:51:23 +0000
committerRoland Dreier <roland@purestorage.com>2012-09-07 16:19:03 -0700
commit92dd6c3d4d4e0a26c9bb987b3f2f08c1da86d9ce (patch)
treefea15e5bdf28b6d3da0d7e963274b41bec21dc38 /drivers
parentfea7a08acb13524b47711625eebea40a0ede69a0 (diff)
downloadlinux-92dd6c3d4d4e0a26c9bb987b3f2f08c1da86d9ce.tar.gz
linux-92dd6c3d4d4e0a26c9bb987b3f2f08c1da86d9ce.tar.bz2
linux-92dd6c3d4d4e0a26c9bb987b3f2f08c1da86d9ce.zip
RDMA/cxgb4: Move dereference below NULL test
spatch with a semantic match is used to found this. (http://coccinelle.lip6.fr/) Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn> Acked-by: Steve Wise <swise@opengridcomputing.com> Signed-off-by: Roland Dreier <roland@purestorage.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/infiniband/hw/cxgb4/cm.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/infiniband/hw/cxgb4/cm.c b/drivers/infiniband/hw/cxgb4/cm.c
index 51f42061dae9..6cfd4d8fd0bd 100644
--- a/drivers/infiniband/hw/cxgb4/cm.c
+++ b/drivers/infiniband/hw/cxgb4/cm.c
@@ -1361,11 +1361,11 @@ static int abort_rpl(struct c4iw_dev *dev, struct sk_buff *skb)
struct tid_info *t = dev->rdev.lldi.tids;
ep = lookup_tid(t, tid);
- PDBG("%s ep %p tid %u\n", __func__, ep, ep->hwtid);
if (!ep) {
printk(KERN_WARNING MOD "Abort rpl to freed endpoint\n");
return 0;
}
+ PDBG("%s ep %p tid %u\n", __func__, ep, ep->hwtid);
mutex_lock(&ep->com.mutex);
switch (ep->com.state) {
case ABORTING: