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>
This commit is contained in:

committed by
Doug Ledford

parent
8ae84f7c56
commit
c755f4afa6
@@ -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);
|
||||
|
Reference in New Issue
Block a user