File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -218,13 +218,13 @@ void __init spear_setup_of_timer(void)
218
218
irq = irq_of_parse_and_map (np , 0 );
219
219
if (!irq ) {
220
220
pr_err ("%s: No irq passed for timer via DT\n" , __func__ );
221
- return ;
221
+ goto err_put_np ;
222
222
}
223
223
224
224
gpt_base = of_iomap (np , 0 );
225
225
if (!gpt_base ) {
226
226
pr_err ("%s: of iomap failed\n" , __func__ );
227
- return ;
227
+ goto err_put_np ;
228
228
}
229
229
230
230
gpt_clk = clk_get_sys ("gpt0" , NULL );
@@ -239,6 +239,8 @@ void __init spear_setup_of_timer(void)
239
239
goto err_prepare_enable_clk ;
240
240
}
241
241
242
+ of_node_put (np );
243
+
242
244
spear_clockevent_init (irq );
243
245
spear_clocksource_init ();
244
246
@@ -248,4 +250,6 @@ void __init spear_setup_of_timer(void)
248
250
clk_put (gpt_clk );
249
251
err_iomap :
250
252
iounmap (gpt_base );
253
+ err_put_np :
254
+ of_node_put (np );
251
255
}
You can’t perform that action at this time.
0 commit comments