From 3f427d76c9cde9404bedc4bfebba5fcecc8ce8ca Mon Sep 17 00:00:00 2001 From: hselasky Date: Mon, 9 May 2016 13:11:00 +0000 Subject: [PATCH] MFC r298772: Correct some error codes to native FreeBSD ones. Sponsored by: Mellanox Technologies Tested by: Netflix git-svn-id: svn://svn.freebsd.org/base/stable/10@299259 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f --- sys/dev/mlx5/mlx5_en/mlx5_en_main.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sys/dev/mlx5/mlx5_en/mlx5_en_main.c b/sys/dev/mlx5/mlx5_en/mlx5_en_main.c index ec5dcfcf1..a76d32e12 100644 --- a/sys/dev/mlx5/mlx5_en/mlx5_en_main.c +++ b/sys/dev/mlx5/mlx5_en/mlx5_en_main.c @@ -2559,6 +2559,7 @@ mlx5e_ioctl(struct ifnet *ifp, u_long command, caddr_t data) if (error) { if_printf(ifp, "Query module num failed, eeprom " "reading is not supported\n"); + error = EINVAL; goto err_i2c; } /* Check if module is present before doing an access */ @@ -2588,6 +2589,7 @@ mlx5e_ioctl(struct ifnet *ifp, u_long command, caddr_t data) if (error) { if_printf(ifp, "Query eeprom failed, eeprom " "reading is not supported\n"); + error = EINVAL; goto err_i2c; } @@ -2601,6 +2603,7 @@ mlx5e_ioctl(struct ifnet *ifp, u_long command, caddr_t data) if (error) { if_printf(ifp, "Query eeprom failed, eeprom " "reading is not supported\n"); + error = EINVAL; goto err_i2c; } -- 2.45.0