IB/mlx5: Fix NULL pointer dereference on debug print
authorEli Cohen <eli@mellanox.com>
Thu, 27 Oct 2016 13:36:46 +0000 (16:36 +0300)
committerDoug Ledford <dledford@redhat.com>
Thu, 17 Nov 2016 01:03:44 +0000 (20:03 -0500)
commita1ab8402d15d2305d2315d96ec3294bfdf16587e
treede32b4419cf2121d2a3d66d6667ef37f65d54d95
parentdbaaff2a2caa03d472b5cc53a3fbfd415c97dc26
IB/mlx5: Fix NULL pointer dereference on debug print

For XRC QP CQs may not exist. Check before attempting dereference.

Fixes: e126ba97dba9 ('mlx5: Add driver for Mellanox Connect-IB adapters')
Signed-off-by: Eli Cohen <eli@mellanox.com>
Signed-off-by: Maor Gottlieb <maorg@mellanox.com>
Reviewed-by: Yishai Hadas <yishaih@mellanox.com>
Signed-off-by: Leon Romanovsky <leon@kernel.org>
Signed-off-by: Doug Ledford <dledford@redhat.com>
drivers/infiniband/hw/mlx5/qp.c