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>
Fri, 13 Dec 2019 07:52:24 +0000 (08:52 +0100)
commit9c6ca33f12cd4b678676c0a9e152c0e2c4e2a277
treed00cc318dc3c543e762020daa2f7a88557d9fd2b
parent446a04d879a0ca9fc58195050ea6117d1f9bd22a
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