aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/bus/imx-weim.c22
1 files changed, 8 insertions, 14 deletions
diff --git a/drivers/bus/imx-weim.c b/drivers/bus/imx-weim.c
index 0c0e6fea129f..0f4b08112afb 100644
--- a/drivers/bus/imx-weim.c
+++ b/drivers/bus/imx-weim.c
@@ -78,36 +78,30 @@ static int weim_probe(struct platform_device *pdev)
78 struct resource *res; 78 struct resource *res;
79 struct clk *clk; 79 struct clk *clk;
80 void __iomem *base; 80 void __iomem *base;
81 int ret = -EINVAL; 81 int ret;
82 82
83 /* get the resource */ 83 /* get the resource */
84 res = platform_get_resource(pdev, IORESOURCE_MEM, 0); 84 res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
85 base = devm_ioremap_resource(&pdev->dev, res); 85 base = devm_ioremap_resource(&pdev->dev, res);
86 if (IS_ERR(base)) { 86 if (IS_ERR(base))
87 ret = PTR_ERR(base); 87 return PTR_ERR(base);
88 goto weim_err;
89 }
90 88
91 /* get the clock */ 89 /* get the clock */
92 clk = devm_clk_get(&pdev->dev, NULL); 90 clk = devm_clk_get(&pdev->dev, NULL);
93 if (IS_ERR(clk)) 91 if (IS_ERR(clk))
94 goto weim_err; 92 return PTR_ERR(clk);
95 93
96 ret = clk_prepare_enable(clk); 94 ret = clk_prepare_enable(clk);
97 if (ret) 95 if (ret)
98 goto weim_err; 96 return ret;
99 97
100 /* parse the device node */ 98 /* parse the device node */
101 ret = weim_parse_dt(pdev, base); 99 ret = weim_parse_dt(pdev, base);
102 if (ret) { 100 if (ret)
103 clk_disable_unprepare(clk); 101 clk_disable_unprepare(clk);
104 goto weim_err; 102 else
105 } 103 dev_info(&pdev->dev, "Driver registered.\n");
106
107 dev_info(&pdev->dev, "WEIM driver registered.\n");
108 return 0;
109 104
110weim_err:
111 return ret; 105 return ret;
112} 106}
113 107