rds: ib: Fix dereference of conn when NULL and cleanup thereof
When rds_ib_cm_connect_complete() and rds_ib_flush_arp_entry() is
called from rds_rdma_cm_event_handler_cmn(), conn may be NULL and a
NULL pointer dereference will happen.
Also cleaned the code by performing the NULL check once.
Orabug:
29924849
Signed-off-by: Dag Moxnes <dag.moxnes@oracle.com>
Signed-off-by: Håkon Bugge <haakon.bugge@oracle.com>
Reviewed-by: Gerd Rausch <gerd.rausch@oracle.com>
(cherry picked from commit
b9c03e078f55f3f7cf9d8aba001ca83ab90e1b82)
Signed-off-by: Brian Maly <brian.maly@oracle.com>