aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/tilcdc
diff options
context:
space:
mode:
authorEzequiel Garcia <ezequiel@vanguardiasur.com.ar>2014-09-02 08:51:16 -0400
committerDave Airlie <airlied@redhat.com>2014-09-16 20:54:47 -0400
commit9430dfa67d7609b2d6c1ba1ce609c4db192fd78e (patch)
tree2ea0c7be2941aaf2658e98b80984925dac57f6f8 /drivers/gpu/drm/tilcdc
parentb478e336b3e75505707a11e78ef8b964ef0a03af (diff)
drm/tilcdc: panel: Add missing of_node_put
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>
Diffstat (limited to 'drivers/gpu/drm/tilcdc')
-rw-r--r--drivers/gpu/drm/tilcdc/tilcdc_panel.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/gpu/drm/tilcdc/tilcdc_panel.c b/drivers/gpu/drm/tilcdc/tilcdc_panel.c
index 4c7aa1d8134f..d581c532790a 100644
--- a/drivers/gpu/drm/tilcdc/tilcdc_panel.c
+++ b/drivers/gpu/drm/tilcdc/tilcdc_panel.c
@@ -311,6 +311,7 @@ static struct tilcdc_panel_info *of_get_panel_info(struct device_node *np)
311 info = kzalloc(sizeof(*info), GFP_KERNEL); 311 info = kzalloc(sizeof(*info), GFP_KERNEL);
312 if (!info) { 312 if (!info) {
313 pr_err("%s: allocation failed\n", __func__); 313 pr_err("%s: allocation failed\n", __func__);
314 of_node_put(info_np);
314 return NULL; 315 return NULL;
315 } 316 }
316 317
@@ -331,8 +332,10 @@ static struct tilcdc_panel_info *of_get_panel_info(struct device_node *np)
331 if (ret) { 332 if (ret) {
332 pr_err("%s: error reading panel-info properties\n", __func__); 333 pr_err("%s: error reading panel-info properties\n", __func__);
333 kfree(info); 334 kfree(info);
335 of_node_put(info_np);
334 return NULL; 336 return NULL;
335 } 337 }
338 of_node_put(info_np);
336 339
337 return info; 340 return info;
338} 341}