]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
igc: use EOPNOTSUPP instead of ENOTSUPP in igc_ethtool_get_sset_count()
authorKohei Enju <enjuk@amazon.com>
Mon, 6 Oct 2025 12:35:22 +0000 (21:35 +0900)
committerTony Nguyen <anthony.l.nguyen@intel.com>
Tue, 28 Oct 2025 19:49:59 +0000 (12:49 -0700)
igc_ethtool_get_sset_count() returns -ENOTSUPP when a given stringset is
not supported, causing userland programs to get "Unknown error 524".

Since EOPNOTSUPP should be used when error is propagated to userland,
return -EOPNOTSUPP instead of -ENOTSUPP.

Fixes: 36b9fea60961 ("igc: Add support for statistics")
Signed-off-by: Kohei Enju <enjuk@amazon.com>
Reviewed-by: Aleksandr Loktionov <aleksandr.loktionov@intel.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
drivers/net/ethernet/intel/igc/igc_ethtool.c

index ca93629b1d3a49766a56bbc3b78d74c8af580690..bb783042d1af9c86f18fc033fa4c3e75abb0efe8 100644 (file)
@@ -810,7 +810,7 @@ static int igc_ethtool_get_sset_count(struct net_device *netdev, int sset)
        case ETH_SS_PRIV_FLAGS:
                return IGC_PRIV_FLAGS_STR_LEN;
        default:
-               return -ENOTSUPP;
+               return -EOPNOTSUPP;
        }
 }