File tree Expand file tree Collapse file tree 1 file changed +9
-14
lines changed Expand file tree Collapse file tree 1 file changed +9
-14
lines changed Original file line number Diff line number Diff line change @@ -387,19 +387,21 @@ static bool mtk_drm_get_all_drm_priv(struct device *dev)
387387
388388 of_id = of_match_node (mtk_drm_of_ids , node );
389389 if (!of_id )
390- goto next_put_node ;
390+ continue ;
391391
392392 pdev = of_find_device_by_node (node );
393393 if (!pdev )
394- goto next_put_node ;
394+ continue ;
395395
396396 drm_dev = device_find_child (& pdev -> dev , NULL , mtk_drm_match );
397+ put_device (& pdev -> dev );
397398 if (!drm_dev )
398- goto next_put_device_pdev_dev ;
399+ continue ;
399400
400401 temp_drm_priv = dev_get_drvdata (drm_dev );
402+ put_device (drm_dev );
401403 if (!temp_drm_priv )
402- goto next_put_device_drm_dev ;
404+ continue ;
403405
404406 if (temp_drm_priv -> data -> main_len )
405407 all_drm_priv [CRTC_MAIN ] = temp_drm_priv ;
@@ -411,17 +413,10 @@ static bool mtk_drm_get_all_drm_priv(struct device *dev)
411413 if (temp_drm_priv -> mtk_drm_bound )
412414 cnt ++ ;
413415
414- next_put_device_drm_dev :
415- put_device (drm_dev );
416-
417- next_put_device_pdev_dev :
418- put_device (& pdev -> dev );
419-
420- next_put_node :
421- of_node_put (node );
422-
423- if (cnt == MAX_CRTC )
416+ if (cnt == MAX_CRTC ) {
417+ of_node_put (node );
424418 break ;
419+ }
425420 }
426421
427422 if (drm_priv -> data -> mmsys_dev_num == cnt ) {
You can’t perform that action at this time.
0 commit comments