IB/ipoib: Prevent setting negative values to max_nonsrq_conn_qp
authorAlex Vesker <valex@mellanox.com>
Thu, 13 Jul 2017 08:27:12 +0000 (11:27 +0300)
committerBen Hutchings <ben@decadent.org.uk>
Sat, 11 Nov 2017 13:34:26 +0000 (13:34 +0000)
commite9b5743885065ef50f74ec6a0b76693f3073ad26
tree143be151a72800396bd0f8ca67a9e33d8c9d9b54
parent347598eafdfa48e43ca200959ded2b79c3109fd7
IB/ipoib: Prevent setting negative values to max_nonsrq_conn_qp

commit 11f74b40359b19f760964e71d04882a6caf530cc upstream.

Don't allow negative values to max_nonsrq_conn_qp. There is no functional
impact on a negative value but it is logicically incorrect.

Fixes: 68e995a29572 ("IPoIB/cm: Add connected mode support for devices without SRQs")
Signed-off-by: Alex Vesker <valex@mellanox.com>
Signed-off-by: Leon Romanovsky <leon@kernel.org>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
drivers/infiniband/ulp/ipoib/ipoib_main.c