]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
igb: use EOPNOTSUPP instead of ENOTSUPP in igb_get_sset_count()
authorKohei Enju <enjuk@amazon.com>
Mon, 6 Oct 2025 12:35:21 +0000 (21:35 +0900)
committerTony Nguyen <anthony.l.nguyen@intel.com>
Tue, 28 Oct 2025 19:49:59 +0000 (12:49 -0700)
igb_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: 9d5c824399de ("igb: PCI-Express 82575 Gigabit Ethernet driver")
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/igb/igb_ethtool.c

index f8a208c84f1501626613f437f4c87d4664c00ce6..10e2445e0ded95a31bbe6991061928d42197f0a0 100644 (file)
@@ -2281,7 +2281,7 @@ static int igb_get_sset_count(struct net_device *netdev, int sset)
        case ETH_SS_PRIV_FLAGS:
                return IGB_PRIV_FLAGS_STR_LEN;
        default:
-               return -ENOTSUPP;
+               return -EOPNOTSUPP;
        }
 }