]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
ixgbe: avoid redundant call to ixgbe_non_sfp_link_config()
authorAlok Tiwari <alok.a.tiwari@oracle.com>
Tue, 25 Nov 2025 22:36:26 +0000 (14:36 -0800)
committerJakub Kicinski <kuba@kernel.org>
Fri, 28 Nov 2025 02:34:21 +0000 (18:34 -0800)
commit5849b56addbfc060a012c7326d3bac279c303f43
tree0a78559ba5b2b0809e7086f216aca74d0907bd47
parent954ba97cca1614bdc6d5dbd37fa357da9febb59d
ixgbe: avoid redundant call to ixgbe_non_sfp_link_config()

ixgbe_non_sfp_link_config() is called twice in ixgbe_open()
once to assign its return value to err and again in the
conditional check. This patch uses the stored err value
instead of calling the function a second time. This avoids
redundant work and ensures consistent error reporting.

Also fix a small typo in the ixgbe_remove() comment:
"The could be caused" -> "This could be caused".

Signed-off-by: Alok Tiwari <alok.a.tiwari@oracle.com>
Reviewed-by: Jedrzej Jagielski <jedrzej.jagielski@intel.com>
Reviewed-by: Paul Menzel <pmenzel@molgen.mpg.de>
Tested-by: Rinitha S <sx.rinitha@intel.com> (A Contingent worker at Intel)
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
Link: https://patch.msgid.link/20251125223632.1857532-8-anthony.l.nguyen@intel.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/intel/ixgbe/ixgbe_main.c