summaryrefslogtreecommitdiff
path: root/include/rdma
diff options
context:
space:
mode:
authorMike Marciniszyn <mike.marciniszyn@intel.com>2016-06-22 13:29:33 -0700
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2016-07-27 08:42:08 -0700
commit68439a76dd421a4aa0663ab19291a91c3f876840 (patch)
treea24204050f3a79c7d73f6f30c219f1a3f0ebe010 /include/rdma
parent03ea1bce809b176d509d6f5036dcbcbfcb17bf6c (diff)
downloadlwn-68439a76dd421a4aa0663ab19291a91c3f876840.tar.gz
lwn-68439a76dd421a4aa0663ab19291a91c3f876840.zip
IB/rdmavt: Correct qp_priv_alloc() return value test
commit c755f4afa66ad3ed98870bd3254f37c47fb2c800 upstream. 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. 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> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include/rdma')
-rw-r--r--include/rdma/rdma_vt.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/include/rdma/rdma_vt.h b/include/rdma/rdma_vt.h
index a8696551abb1..6ee9d97004d5 100644
--- a/include/rdma/rdma_vt.h
+++ b/include/rdma/rdma_vt.h
@@ -203,7 +203,9 @@ struct rvt_driver_provided {
/*
* Allocate a private queue pair data structure for driver specific
- * information which is opaque to rdmavt.
+ * information which is opaque to rdmavt. Errors are returned via
+ * ERR_PTR(err). The driver is free to return NULL or a valid
+ * pointer.
*/
void * (*qp_priv_alloc)(struct rvt_dev_info *rdi, struct rvt_qp *qp,
gfp_t gfp);