Commit c1a3acaa authored by Vivek Gautam's avatar Vivek Gautam Committed by Felipe Balbi

usb: dwc3: exynos: Remove local variable for clock from probe

There's no need to keep one local variable for clock, and
then assign the same to 'clk' member of dwc3_exynos.
Just cleaning it up.
Signed-off-by: default avatarVivek Gautam <gautam.vivek@samsung.com>
Signed-off-by: default avatarFelipe Balbi <balbi@ti.com>
parent df9f7b31
...@@ -105,7 +105,6 @@ static int dwc3_exynos_remove_child(struct device *dev, void *unused) ...@@ -105,7 +105,6 @@ static int dwc3_exynos_remove_child(struct device *dev, void *unused)
static int dwc3_exynos_probe(struct platform_device *pdev) static int dwc3_exynos_probe(struct platform_device *pdev)
{ {
struct dwc3_exynos *exynos; struct dwc3_exynos *exynos;
struct clk *clk;
struct device *dev = &pdev->dev; struct device *dev = &pdev->dev;
struct device_node *node = dev->of_node; struct device_node *node = dev->of_node;
...@@ -132,15 +131,13 @@ static int dwc3_exynos_probe(struct platform_device *pdev) ...@@ -132,15 +131,13 @@ static int dwc3_exynos_probe(struct platform_device *pdev)
return ret; return ret;
} }
clk = devm_clk_get(dev, "usbdrd30"); exynos->dev = dev;
if (IS_ERR(clk)) {
exynos->clk = devm_clk_get(dev, "usbdrd30");
if (IS_ERR(exynos->clk)) {
dev_err(dev, "couldn't get clock\n"); dev_err(dev, "couldn't get clock\n");
return -EINVAL; return -EINVAL;
} }
exynos->dev = dev;
exynos->clk = clk;
clk_prepare_enable(exynos->clk); clk_prepare_enable(exynos->clk);
exynos->vdd33 = devm_regulator_get(dev, "vdd33"); exynos->vdd33 = devm_regulator_get(dev, "vdd33");
...@@ -184,7 +181,7 @@ static int dwc3_exynos_probe(struct platform_device *pdev) ...@@ -184,7 +181,7 @@ static int dwc3_exynos_probe(struct platform_device *pdev)
err3: err3:
regulator_disable(exynos->vdd33); regulator_disable(exynos->vdd33);
err2: err2:
clk_disable_unprepare(clk); clk_disable_unprepare(exynos->clk);
return ret; return ret;
} }
......
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