Commit b09e99ee authored by Andy Shevchenko's avatar Andy Shevchenko Committed by Felipe Balbi

usb: dwc3: no need to initialize ret variable

First usage of ret variable will re-write initial value. Thus, there is no need
to initialize it.
Signed-off-by: default avatarAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: default avatarFelipe Balbi <balbi@ti.com>
parent 7419485f
...@@ -626,7 +626,7 @@ static int dwc3_probe(struct platform_device *pdev) ...@@ -626,7 +626,7 @@ static int dwc3_probe(struct platform_device *pdev)
struct resource *res; struct resource *res;
struct dwc3 *dwc; struct dwc3 *dwc;
int ret = -ENOMEM; int ret;
void __iomem *regs; void __iomem *regs;
void *mem; void *mem;
......
...@@ -110,12 +110,12 @@ static int dwc3_exynos_probe(struct platform_device *pdev) ...@@ -110,12 +110,12 @@ static int dwc3_exynos_probe(struct platform_device *pdev)
struct device *dev = &pdev->dev; struct device *dev = &pdev->dev;
struct device_node *node = dev->of_node; struct device_node *node = dev->of_node;
int ret = -ENOMEM; int ret;
exynos = devm_kzalloc(dev, sizeof(*exynos), GFP_KERNEL); exynos = devm_kzalloc(dev, sizeof(*exynos), GFP_KERNEL);
if (!exynos) { if (!exynos) {
dev_err(dev, "not enough memory\n"); dev_err(dev, "not enough memory\n");
goto err1; return -ENOMEM;
} }
/* /*
...@@ -125,21 +125,20 @@ static int dwc3_exynos_probe(struct platform_device *pdev) ...@@ -125,21 +125,20 @@ static int dwc3_exynos_probe(struct platform_device *pdev)
*/ */
ret = dma_coerce_mask_and_coherent(dev, DMA_BIT_MASK(32)); ret = dma_coerce_mask_and_coherent(dev, DMA_BIT_MASK(32));
if (ret) if (ret)
goto err1; return ret;
platform_set_drvdata(pdev, exynos); platform_set_drvdata(pdev, exynos);
ret = dwc3_exynos_register_phys(exynos); ret = dwc3_exynos_register_phys(exynos);
if (ret) { if (ret) {
dev_err(dev, "couldn't register PHYs\n"); dev_err(dev, "couldn't register PHYs\n");
goto err1; return ret;
} }
clk = devm_clk_get(dev, "usbdrd30"); clk = devm_clk_get(dev, "usbdrd30");
if (IS_ERR(clk)) { if (IS_ERR(clk)) {
dev_err(dev, "couldn't get clock\n"); dev_err(dev, "couldn't get clock\n");
ret = -EINVAL; return -EINVAL;
goto err1;
} }
exynos->dev = dev; exynos->dev = dev;
...@@ -189,7 +188,6 @@ static int dwc3_exynos_probe(struct platform_device *pdev) ...@@ -189,7 +188,6 @@ static int dwc3_exynos_probe(struct platform_device *pdev)
regulator_disable(exynos->vdd33); regulator_disable(exynos->vdd33);
err2: err2:
clk_disable_unprepare(clk); clk_disable_unprepare(clk);
err1:
return ret; return ret;
} }
......
...@@ -393,7 +393,7 @@ static int dwc3_omap_probe(struct platform_device *pdev) ...@@ -393,7 +393,7 @@ static int dwc3_omap_probe(struct platform_device *pdev)
struct extcon_dev *edev; struct extcon_dev *edev;
struct regulator *vbus_reg = NULL; struct regulator *vbus_reg = NULL;
int ret = -ENOMEM; int ret;
int irq; int irq;
int utmi_mode = 0; int utmi_mode = 0;
......
...@@ -99,7 +99,7 @@ static int dwc3_pci_probe(struct pci_dev *pci, ...@@ -99,7 +99,7 @@ static int dwc3_pci_probe(struct pci_dev *pci,
struct resource res[2]; struct resource res[2];
struct platform_device *dwc3; struct platform_device *dwc3;
struct dwc3_pci *glue; struct dwc3_pci *glue;
int ret = -ENOMEM; int ret;
struct device *dev = &pci->dev; struct device *dev = &pci->dev;
glue = devm_kzalloc(dev, sizeof(*glue), GFP_KERNEL); glue = devm_kzalloc(dev, sizeof(*glue), GFP_KERNEL);
......
...@@ -584,7 +584,7 @@ static int __dwc3_gadget_ep_enable(struct dwc3_ep *dep, ...@@ -584,7 +584,7 @@ static int __dwc3_gadget_ep_enable(struct dwc3_ep *dep,
{ {
struct dwc3 *dwc = dep->dwc; struct dwc3 *dwc = dep->dwc;
u32 reg; u32 reg;
int ret = -ENOMEM; int ret;
dev_vdbg(dwc->dev, "Enabling %s\n", dep->name); dev_vdbg(dwc->dev, "Enabling %s\n", dep->name);
......
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