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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 8 Mar 2022 18:12:48 +0000 (19:12 +0100)
commitc9cfcdd111d7f82831ec9f205f4370427739b9d5
treeb7e546c87e79a77e3c0ec198d502b9dd82632a6e
parent7c1db4a30e29952ac6648e6231ebfbcc16e5e14b
igc: igc_read_phy_reg_gpy: drop premature return

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>
drivers/net/ethernet/intel/igc/igc_phy.c