File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -373,11 +373,12 @@ static bool mtk_drm_get_all_drm_priv(struct device *dev)
373
373
struct mtk_drm_private * temp_drm_priv ;
374
374
struct device_node * phandle = dev -> parent -> of_node ;
375
375
const struct of_device_id * of_id ;
376
+ struct device_node * node ;
376
377
struct device * drm_dev ;
377
378
unsigned int cnt = 0 ;
378
379
int i , j ;
379
380
380
- for_each_child_of_node_scoped (phandle -> parent , node ) {
381
+ for_each_child_of_node (phandle -> parent , node ) {
381
382
struct platform_device * pdev ;
382
383
383
384
of_id = of_match_node (mtk_drm_of_ids , node );
@@ -406,8 +407,10 @@ static bool mtk_drm_get_all_drm_priv(struct device *dev)
406
407
if (temp_drm_priv -> mtk_drm_bound )
407
408
cnt ++ ;
408
409
409
- if (cnt == MAX_CRTC )
410
+ if (cnt == MAX_CRTC ) {
411
+ of_node_put (node );
410
412
break ;
413
+ }
411
414
}
412
415
413
416
if (drm_priv -> data -> mmsys_dev_num == cnt ) {
You can’t perform that action at this time.
0 commit comments