diff mbox series

[ethtool] ethtool: do_sset return correct value on fail

Message ID 20201213142503.25509-1-tariqt@nvidia.com
State New
Headers show
Series [ethtool] ethtool: do_sset return correct value on fail | expand

Commit Message

Tariq Toukan Dec. 13, 2020, 2:25 p.m. UTC
From: Roy Novich <royno@nvidia.com>

The return value for do_sset was constant and returned 0.
This value is misleading when returned on operation failure.
Changed return value to the correct function err status.

Fixes: 32c8037055f5 ("Initial import of ethtool version 3 + a few patches.")
Signed-off-by: Roy Novich <royno@nvidia.com>
Signed-off-by: Tariq Toukan <tariqt@nvidia.com>
---
 ethtool.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/ethtool.c b/ethtool.c
index 1d9067e774af..5cc875c64591 100644
--- a/ethtool.c
+++ b/ethtool.c
@@ -3287,7 +3287,7 @@  static int do_sset(struct cmd_context *ctx)
 		}
 	}
 
-	return 0;
+	return err;
 }
 
 static int do_gregs(struct cmd_context *ctx)