RDMA/qedr: add null check before pointer dereference
authorGustavo A. R. Silva <garsilva@embeddedor.com>
Mon, 22 May 2017 18:30:15 +0000 (13:30 -0500)
committerDoug Ledford <dledford@redhat.com>
Thu, 1 Jun 2017 21:20:08 +0000 (17:20 -0400)
commitd38d7fdafaf89d1756f27e9b4054dd19a1d2f545
treecf620f4019a4a5e3b4128abee6da82b86d366768
parent6e8484c5cf07c7ee632587e98c1a12d319dacb7c
RDMA/qedr: add null check before pointer dereference

Add null check before dereferencing pointer sgid_attr.ndev
inside function rdma_vlan_dev_vlan_id().

Addresses-Coverity-ID: 1373979
Signed-off-by: Gustavo A. R. Silva <garsilva@embeddedor.com>
Acked-by: Ram Amrani <Ram.Amrani@cavium.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
drivers/infiniband/hw/qedr/qedr_cm.c