net: intel: remove conditional return with no effect

Both branches of the check return the same value, so the check has
no effect. Remove it and return the value directly.

This is the result of running the Coccinelle script from
scripts/coccinelle/misc/cond_return_no_effect.cocci.

Signed-off-by: Sang-Heon Jeon <ekffu200098@gmail.com>
Reviewed-by: Marcin Szycik <marcin.szycik@linux.intel.com>
Link: https://patch.msgid.link/20260725150852.859188-5-ekffu200098@gmail.com
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
This commit is contained in:
Sang-Heon Jeon 2026-07-26 00:08:52 +09:00 committed by Paolo Abeni
parent cd833378ba
commit 1f35011c28
3 changed files with 3 additions and 17 deletions

View File

@ -4864,16 +4864,10 @@ static void i40e_control_rx_q(struct i40e_pf *pf, int pf_q, bool enable)
**/
int i40e_control_wait_rx_q(struct i40e_pf *pf, int pf_q, bool enable)
{
int ret = 0;
i40e_control_rx_q(pf, pf_q, enable);
/* wait for the change to finish */
ret = i40e_pf_rxq_wait(pf, pf_q, enable);
if (ret)
return ret;
return ret;
return i40e_pf_rxq_wait(pf, pf_q, enable);
}
/**

View File

@ -756,11 +756,7 @@ static s32 __igb_access_xmdio_reg(struct e1000_hw *hw, u16 address,
return ret_val;
/* Recalibrate the device back to 0 */
ret_val = hw->phy.ops.write_reg(hw, E1000_MMDAC, 0);
if (ret_val)
return ret_val;
return ret_val;
return hw->phy.ops.write_reg(hw, E1000_MMDAC, 0);
}
/**

View File

@ -675,11 +675,7 @@ static s32 __igc_access_xmdio_reg(struct igc_hw *hw, u16 address,
return ret_val;
/* Recalibrate the device back to 0 */
ret_val = hw->phy.ops.write_reg(hw, IGC_MMDAC, 0);
if (ret_val)
return ret_val;
return ret_val;
return hw->phy.ops.write_reg(hw, IGC_MMDAC, 0);
}
/**