3.16.44-rc1 review patch.  If anyone has any objections, please let me know.

------------------

From: Leon Romanovsky <[email protected]>

commit 12bbf1ea7e3b35892dbb8636b978160bc9576b61 upstream.

In case of unsupported singature, we returned positive
value, while the better approach is to return -EINVAL.

In addition, in this change, the error print is enriched
to provide an actual supplied signature type.

Fixes: e6631814fb3a ("IB/mlx5: Support IB_WR_REG_SIG_MR")
Cc: Sagi Grimberg <[email protected]>
Reported-by: Dan Carpenter <[email protected]>
Signed-off-by: Leon Romanovsky <[email protected]>
Signed-off-by: Leon Romanovsky <[email protected]>
Signed-off-by: Doug Ledford <[email protected]>
Signed-off-by: Ben Hutchings <[email protected]>
---
 drivers/infiniband/hw/mlx5/qp.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

--- a/drivers/infiniband/hw/mlx5/qp.c
+++ b/drivers/infiniband/hw/mlx5/qp.c
@@ -2336,8 +2336,9 @@ static int set_psv_wr(struct ib_sig_doma
                break;
 
        default:
-               pr_err("Bad signature type given.\n");
-               return 1;
+               pr_err("Bad signature type (%d) is given.\n",
+                      domain->sig_type);
+               return -EINVAL;
        }
 
        return 0;

Reply via email to