]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commit
igc: igc_read_phy_reg_gpy: drop premature return
authorCorinna Vinschen <vinschen@redhat.com>
Wed, 16 Feb 2022 13:31:35 +0000 (14:31 +0100)
committerPaolo Pisati <paolo.pisati@canonical.com>
Wed, 9 Mar 2022 14:17:55 +0000 (15:17 +0100)
commitef7b722fa18f401864f3942a63f9f95f2a083cee
treeb829c4a48836421a01c6709c4f3b20994554333b
parentcea2e37be0667d583c0d6286a43358d5c7ee4c65
igc: igc_read_phy_reg_gpy: drop premature return

BugLink: https://bugs.launchpad.net/bugs/1964361
commit fda2635466cd26ad237e1bc5d3f6a60f97ad09b6 upstream.

igc_read_phy_reg_gpy checks the return value from igc_read_phy_reg_mdic
and if it's not 0, returns immediately. By doing this, it leaves the HW
semaphore in the acquired state.

Drop this premature return statement, the function returns after
releasing the semaphore immediately anyway.

Fixes: 5586838fe9ce ("igc: Add code for PHY support")
Signed-off-by: Corinna Vinschen <vinschen@redhat.com>
Acked-by: Sasha Neftin <sasha.neftin@intel.com>
Tested-by: Naama Meir <naamax.meir@linux.intel.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com>
drivers/net/ethernet/intel/igc/igc_phy.c