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)
committerDavid S. Miller <davem@davemloft.net>
Tue, 4 Dec 2018 00:34:31 +0000 (16:34 -0800)
commit95aac2cdafd8c8298c9b2589c52f44db0d824e0e
treea5a8bfe2b2f9b6c765e7b9bf7ecfa71e91332fcd
parent30fcd6a9edf1a169a07c3558f3a6e6a0007760fb
net/mlx4_core: Fix return codes of unsupported operations

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>
drivers/net/ethernet/mellanox/mlx4/main.c