IB/rdmavt: Correct qp_priv_alloc() return value test
authorMike Marciniszyn <mike.marciniszyn@intel.com>
Wed, 22 Jun 2016 20:29:33 +0000 (13:29 -0700)
committerDoug Ledford <dledford@redhat.com>
Thu, 23 Jun 2016 14:16:15 +0000 (10:16 -0400)
commitc755f4afa66ad3ed98870bd3254f37c47fb2c800
treea395969f595da0bcc305d2b4400a7462402832bc
parent8ae84f7c56044ee17ef6b700cb34d11ad9428a2e
IB/rdmavt: Correct qp_priv_alloc() return value test

The current drivers return errors from this calldown
wrapped in an ERR_PTR().

The rdmavt code incorrectly tests for NULL.

The code is fixed to use IS_ERR() and change ret according
to the driver return value.

Cc: Stable <stable@vger.kernel.org> # 4.6+
Reviewed-by: Dennis Dalessandro <dennis.dalessandro@intel.com>
Signed-off-by: Mike Marciniszyn <mike.marciniszyn@intel.com>
Signed-off-by: Dennis Dalessandro <dennis.dalessandro@intel.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
drivers/infiniband/sw/rdmavt/qp.c
include/rdma/rdma_vt.h