Skip to content

Commit

Permalink
drm/tilcdc: panel: Add missing of_node_put
Browse files Browse the repository at this point in the history
This commit adds the missing calls to of_node_put to release the node
that's currently held by the of_get_child_by_name() call in the panel
info parsing code.

Tested-by: Darren Etheridge <detheridge@ti.com>
Tested-by: Johannes Pointner <johannes.pointner@br-automation.com>
Signed-off-by: Ezequiel Garcia <ezequiel@vanguardiasur.com.ar>
Signed-off-by: Dave Airlie <airlied@redhat.com>
  • Loading branch information
Ezequiel Garcia authored and Dave Airlie committed Sep 17, 2014
1 parent b478e33 commit 9430dfa
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions drivers/gpu/drm/tilcdc/tilcdc_panel.c
Original file line number Diff line number Diff line change
Expand Up @@ -311,6 +311,7 @@ static struct tilcdc_panel_info *of_get_panel_info(struct device_node *np)
info = kzalloc(sizeof(*info), GFP_KERNEL);
if (!info) {
pr_err("%s: allocation failed\n", __func__);
of_node_put(info_np);
return NULL;
}

Expand All @@ -331,8 +332,10 @@ static struct tilcdc_panel_info *of_get_panel_info(struct device_node *np)
if (ret) {
pr_err("%s: error reading panel-info properties\n", __func__);
kfree(info);
of_node_put(info_np);
return NULL;
}
of_node_put(info_np);

return info;
}
Expand Down

0 comments on commit 9430dfa

Please sign in to comment.