forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-05-10 37f49e37ab4cb5d0bc4c60eb5c6d4dd57db767bb
kernel/drivers/clk/ti/clk-dra7-atl.c
....@@ -189,8 +189,8 @@
189189 init.num_parents = of_clk_get_parent_count(node);
190190
191191 if (init.num_parents != 1) {
192
- pr_err("%s: atl clock %s must have 1 parent\n", __func__,
193
- node->name);
192
+ pr_err("%s: atl clock %pOFn must have 1 parent\n", __func__,
193
+ node);
194194 goto cleanup;
195195 }
196196
....@@ -233,7 +233,6 @@
233233 cinfo->iobase = of_iomap(node, 0);
234234 cinfo->dev = &pdev->dev;
235235 pm_runtime_enable(cinfo->dev);
236
- pm_runtime_irq_safe(cinfo->dev);
237236
238237 pm_runtime_get_sync(cinfo->dev);
239238 atl_write(cinfo, DRA7_ATL_PCLKMUX_REG(0), DRA7_ATL_PCLKMUX);
....@@ -252,14 +251,16 @@
252251 if (rc) {
253252 pr_err("%s: failed to lookup atl clock %d\n", __func__,
254253 i);
255
- return -EINVAL;
254
+ ret = -EINVAL;
255
+ goto pm_put;
256256 }
257257
258258 clk = of_clk_get_from_provider(&clkspec);
259259 if (IS_ERR(clk)) {
260260 pr_err("%s: failed to get atl clock %d from provider\n",
261261 __func__, i);
262
- return PTR_ERR(clk);
262
+ ret = PTR_ERR(clk);
263
+ goto pm_put;
263264 }
264265
265266 cdesc = to_atl_desc(__clk_get_hw(clk));
....@@ -292,8 +293,9 @@
292293 if (cdesc->enabled)
293294 atl_clk_enable(__clk_get_hw(clk));
294295 }
295
- pm_runtime_put_sync(cinfo->dev);
296296
297
+pm_put:
298
+ pm_runtime_put_sync(cinfo->dev);
297299 return ret;
298300 }
299301