net/mlx4_core: Fix return codes of unsupported operations
authorErez Alfasi <ereza@mellanox.com>
Sun, 2 Dec 2018 15:40:25 +0000 (17:40 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 21 Dec 2019 09:41:22 +0000 (10:41 +0100)
commitf219d291e16706e51ba72aadc95c0c1be0915081
tree87d49ab0698d3cdd22af17f8daba634c256c41ad
parent6d9f5505a47a6f9d8ff54fab53363acc456fe414
net/mlx4_core: Fix return codes of unsupported operations

[ Upstream commit 95aac2cdafd8c8298c9b2589c52f44db0d824e0e ]

Functions __set_port_type and mlx4_check_port_params returned
-EINVAL while the proper return code is -EOPNOTSUPP as a
result of an unsupported operation. All drivers should generate
this and all users should check for it when detecting an
unsupported functionality.

Signed-off-by: Erez Alfasi <ereza@mellanox.com>
Signed-off-by: Tariq Toukan <tariqt@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/ethernet/mellanox/mlx4/main.c