diff options
author | Michael J. Ruhl <michael.j.ruhl@intel.com> | 2017-05-04 05:14:28 -0700 |
---|---|---|
committer | Doug Ledford <dledford@redhat.com> | 2017-05-04 19:31:46 -0400 |
commit | 94679061dcdddbafcf24e3bfb526e54dedcc2f2f (patch) | |
tree | f0f523a828f66d165592f9ee107fb52e5ce4b25d /drivers/infiniband | |
parent | 9746fa439c63893195c7f285728617ab874b8bbd (diff) | |
download | linux-94679061dcdddbafcf24e3bfb526e54dedcc2f2f.tar.bz2 |
IB/hfi1: Return an error on memory allocation failure
If the eager buffer allocation fails, it is necessary to return
an error code.
Cc: stable@vger.kernel.org
Reviewed-by: Mike Marciniszyn <mike.marciniszyn@intel.com>
Signed-off-by: Michael J. Ruhl <michael.j.ruhl@intel.com>
Signed-off-by: Dennis Dalessandro <dennis.dalessandro@intel.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
Diffstat (limited to 'drivers/infiniband')
-rw-r--r-- | drivers/infiniband/hw/hfi1/init.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/infiniband/hw/hfi1/init.c b/drivers/infiniband/hw/hfi1/init.c index c573f06fb7b9..b2db77626fc5 100644 --- a/drivers/infiniband/hw/hfi1/init.c +++ b/drivers/infiniband/hw/hfi1/init.c @@ -1778,6 +1778,7 @@ int hfi1_setup_eagerbufs(struct hfi1_ctxtdata *rcd) !HFI1_CAP_KGET_MASK(rcd->flags, MULTI_PKT_EGR)) { dd_dev_err(dd, "ctxt%u: Failed to allocate eager buffers\n", rcd->ctxt); + ret = -ENOMEM; goto bail_rcvegrbuf_phys; } |