Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 9430dfa6 authored by Ezequiel Garcia's avatar Ezequiel Garcia Committed by Dave Airlie
Browse files

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: default avatarDarren Etheridge <detheridge@ti.com>
Tested-by: default avatarJohannes Pointner <johannes.pointner@br-automation.com>
Signed-off-by: default avatarEzequiel Garcia <ezequiel@vanguardiasur.com.ar>
Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
parent b478e336
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -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;
	}

@@ -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;
}