summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDominique Martinet <dominique.martinet@cea.fr>2018-09-08 00:26:50 +0900
committerDominique Martinet <dominique.martinet@cea.fr>2018-09-08 01:52:22 +0900
commit473c7dd1d7b59ff8f88a5154737e3eac78a96e5b (patch)
tree62ed92cf5673d8d35de8bf6ad6361861af83236f
parente02a53d92e197706cad1627bd84705d4aa20a145 (diff)
9p/rdma: remove useless check in cm_event_handler
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>
-rw-r--r--net/9p/trans_rdma.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/net/9p/trans_rdma.c b/net/9p/trans_rdma.c
index 9719bc4d9424..119103bfa82e 100644
--- 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: