projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e02a53d
)
9p/rdma: remove useless check in cm_event_handler
author
Dominique Martinet
<dominique.martinet@cea.fr>
Fri, 7 Sep 2018 15:26:50 +0000
(
00:26
+0900)
committer
Dominique Martinet
<dominique.martinet@cea.fr>
Fri, 7 Sep 2018 16:52:22 +0000
(
01:52
+0900)
the client c is always dereferenced to get the rdma struct, so c has to
be a valid pointer at this point.
Gcc would optimize that away but let's make coverity happy...
Link:
http://lkml.kernel.org/r/1536339057-21974-3-git-send-email-asmadeus@codewreck.org
Addresses-Coverity-ID: 102778 ("Dereference before null check")
Signed-off-by: Dominique Martinet <dominique.martinet@cea.fr>
net/9p/trans_rdma.c
patch
|
blob
|
history
diff --git
a/net/9p/trans_rdma.c
b/net/9p/trans_rdma.c
index 9719bc4d9424f429d542e458733e949fbbe946d9..119103bfa82eef579e53e60908812b33c1fea52f 100644
(file)
--- a/
net/9p/trans_rdma.c
+++ b/
net/9p/trans_rdma.c
@@
-274,8
+274,7
@@
p9_cm_event_handler(struct rdma_cm_id *id, struct rdma_cm_event *event)
case RDMA_CM_EVENT_DISCONNECTED:
if (rdma)
rdma->state = P9_RDMA_CLOSED;
- if (c)
- c->status = Disconnected;
+ c->status = Disconnected;
break;
case RDMA_CM_EVENT_TIMEWAIT_EXIT: