Skip to content

Commit c01ddaa

Browse files
Dominique Martinetgregkh
authored andcommitted
9p/rdma: remove useless check in cm_event_handler
[ Upstream commit 473c7dd ] 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/[email protected] Addresses-Coverity-ID: 102778 ("Dereference before null check") Signed-off-by: Dominique Martinet <[email protected]> Signed-off-by: Sasha Levin <[email protected]>
1 parent f779172 commit c01ddaa

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

net/9p/trans_rdma.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -254,8 +254,7 @@ p9_cm_event_handler(struct rdma_cm_id *id, struct rdma_cm_event *event)
254254
case RDMA_CM_EVENT_DISCONNECTED:
255255
if (rdma)
256256
rdma->state = P9_RDMA_CLOSED;
257-
if (c)
258-
c->status = Disconnected;
257+
c->status = Disconnected;
259258
break;
260259

261260
case RDMA_CM_EVENT_TIMEWAIT_EXIT:

0 commit comments

Comments
 (0)