aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorHoang-Nam Nguyen <hnguyen@linux.vnet.ibm.com>2007-05-16 08:50:55 -0400
committerRoland Dreier <rolandd@cisco.com>2007-05-19 11:51:54 -0400
commitbd5a6ccc0e6d8eed3047b4af0e5c1e7168869cd8 (patch)
treede6f1244a49a5facba605812d8c0f03167374ff2 /drivers
parent26bbf13ce1ca21ec69175bcc4b995cb8ffdf8593 (diff)
IB/ehca: Return proper error code if register_mr fails
Set the return code of ehca_register_mr() to ENOMEM if the corresponding firmware call fails due to out of resources. Some other error codes were explicitly mapped to EINVAL -- just remove those cases so they get mapped to the default case, which already returns EINVAL anyway. Signed-off-by: Hoang-Nam Nguyen <hnguyen@de.ibm.com> Signed-off-by: Roland Dreier <rolandd@cisco.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/infiniband/hw/ehca/ehca_mrmw.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/drivers/infiniband/hw/ehca/ehca_mrmw.c b/drivers/infiniband/hw/ehca/ehca_mrmw.c
index 84c5bb498563..add79bd44e39 100644
--- a/drivers/infiniband/hw/ehca/ehca_mrmw.c
+++ b/drivers/infiniband/hw/ehca/ehca_mrmw.c
@@ -2050,13 +2050,10 @@ int ehca_mrmw_map_hrc_alloc(const u64 hipz_rc)
2050 switch (hipz_rc) { 2050 switch (hipz_rc) {
2051 case H_SUCCESS: /* successful completion */ 2051 case H_SUCCESS: /* successful completion */
2052 return 0; 2052 return 0;
2053 case H_ADAPTER_PARM: /* invalid adapter handle */
2054 case H_RT_PARM: /* invalid resource type */
2055 case H_NOT_ENOUGH_RESOURCES: /* insufficient resources */ 2053 case H_NOT_ENOUGH_RESOURCES: /* insufficient resources */
2056 case H_MLENGTH_PARM: /* invalid memory length */
2057 case H_MEM_ACCESS_PARM: /* invalid access controls */
2058 case H_CONSTRAINED: /* resource constraint */ 2054 case H_CONSTRAINED: /* resource constraint */
2059 return -EINVAL; 2055 case H_NO_MEM:
2056 return -ENOMEM;
2060 case H_BUSY: /* long busy */ 2057 case H_BUSY: /* long busy */
2061 return -EBUSY; 2058 return -EBUSY;
2062 default: 2059 default: