Commit d5383b03 authored by Andy Shevchenko's avatar Andy Shevchenko Committed by David S. Miller

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: default avatarAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 52c1f794
...@@ -347,16 +347,11 @@ static int intel_mgbe_common_data(struct pci_dev *pdev, ...@@ -347,16 +347,11 @@ static int intel_mgbe_common_data(struct pci_dev *pdev,
static int ehl_common_data(struct pci_dev *pdev, static int ehl_common_data(struct pci_dev *pdev,
struct plat_stmmacenet_data *plat) struct plat_stmmacenet_data *plat)
{ {
int ret;
plat->rx_queues_to_use = 8; plat->rx_queues_to_use = 8;
plat->tx_queues_to_use = 8; plat->tx_queues_to_use = 8;
plat->clk_ptp_rate = 200000000; 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, static int ehl_sgmii_data(struct pci_dev *pdev,
...@@ -457,16 +452,11 @@ static struct stmmac_pci_info ehl_pse1_sgmii1g_pci_info = { ...@@ -457,16 +452,11 @@ static struct stmmac_pci_info ehl_pse1_sgmii1g_pci_info = {
static int tgl_common_data(struct pci_dev *pdev, static int tgl_common_data(struct pci_dev *pdev,
struct plat_stmmacenet_data *plat) struct plat_stmmacenet_data *plat)
{ {
int ret;
plat->rx_queues_to_use = 6; plat->rx_queues_to_use = 6;
plat->tx_queues_to_use = 4; plat->tx_queues_to_use = 4;
plat->clk_ptp_rate = 200000000; 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, static int tgl_sgmii_data(struct pci_dev *pdev,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment