diff options
Diffstat (limited to 'drivers/gpu/drm/sun4i/sun4i_backend.c')
| -rw-r--r-- | drivers/gpu/drm/sun4i/sun4i_backend.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/gpu/drm/sun4i/sun4i_backend.c b/drivers/gpu/drm/sun4i/sun4i_backend.c index 9e9255ee59cd..a021bab11a4f 100644 --- a/drivers/gpu/drm/sun4i/sun4i_backend.c +++ b/drivers/gpu/drm/sun4i/sun4i_backend.c | |||
| @@ -786,17 +786,18 @@ static struct sun4i_frontend *sun4i_backend_find_frontend(struct sun4i_drv *drv, | |||
| 786 | remote = of_graph_get_remote_port_parent(ep); | 786 | remote = of_graph_get_remote_port_parent(ep); |
| 787 | if (!remote) | 787 | if (!remote) |
| 788 | continue; | 788 | continue; |
| 789 | of_node_put(remote); | ||
| 789 | 790 | ||
| 790 | /* does this node match any registered engines? */ | 791 | /* does this node match any registered engines? */ |
| 791 | list_for_each_entry(frontend, &drv->frontend_list, list) { | 792 | list_for_each_entry(frontend, &drv->frontend_list, list) { |
| 792 | if (remote == frontend->node) { | 793 | if (remote == frontend->node) { |
| 793 | of_node_put(remote); | ||
| 794 | of_node_put(port); | 794 | of_node_put(port); |
| 795 | of_node_put(ep); | ||
| 795 | return frontend; | 796 | return frontend; |
| 796 | } | 797 | } |
| 797 | } | 798 | } |
| 798 | } | 799 | } |
| 799 | 800 | of_node_put(port); | |
| 800 | return ERR_PTR(-EINVAL); | 801 | return ERR_PTR(-EINVAL); |
| 801 | } | 802 | } |
| 802 | 803 | ||
