diff options
author | Andy Shevchenko <andriy.shevchenko@linux.intel.com> | 2020-04-30 18:02:52 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2020-04-30 12:50:15 -0700 |
commit | d5383b0376643245d82230d8a974edd193ec900c (patch) | |
tree | ec70a0e82bc047e24ef805713e965b815d923009 /drivers/net/ethernet/stmicro/stmmac | |
parent | 52c1f794845411c39ee6deedb443894ca141b4a7 (diff) |
stmmac: intel: Eliminate useless conditions and variables
There are useless conditions like
func()
{
...
int ret;
...
ret = foo();
if (ret)
return ret;
return 0;
}
which may be replaced with direct return statement, what we have done here.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/stmicro/stmmac')
-rw-r--r-- | drivers/net/ethernet/stmicro/stmmac/dwmac-intel.c | 14 |
1 files changed, 2 insertions, 12 deletions
diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-intel.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-intel.c index bb8bf31c1259..b0d735e4c13c 100644 --- a/drivers/net/ethernet/stmicro/stmmac/dwmac-intel.c +++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-intel.c @@ -347,16 +347,11 @@ static int intel_mgbe_common_data(struct pci_dev *pdev, static int ehl_common_data(struct pci_dev *pdev, struct plat_stmmacenet_data *plat) { - int ret; - plat->rx_queues_to_use = 8; plat->tx_queues_to_use = 8; plat->clk_ptp_rate = 200000000; - ret = intel_mgbe_common_data(pdev, plat); - if (ret) - return ret; - return 0; + return intel_mgbe_common_data(pdev, plat); } static int ehl_sgmii_data(struct pci_dev *pdev, @@ -457,16 +452,11 @@ static struct stmmac_pci_info ehl_pse1_sgmii1g_pci_info = { static int tgl_common_data(struct pci_dev *pdev, struct plat_stmmacenet_data *plat) { - int ret; - plat->rx_queues_to_use = 6; plat->tx_queues_to_use = 4; plat->clk_ptp_rate = 200000000; - ret = intel_mgbe_common_data(pdev, plat); - if (ret) - return ret; - return 0; + return intel_mgbe_common_data(pdev, plat); } static int tgl_sgmii_data(struct pci_dev *pdev, |