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

Commit 88a93f73 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "msm: mdss: Fix memleak in framebuffer register and remove"

parents ff4b8a99 e7284e10
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -991,6 +991,7 @@ static void mdss_dsi_debugfs_cleanup(struct mdss_dsi_ctrl_pdata *ctrl_pdata)
		struct mdss_dsi_debugfs_info *dfs = ctrl->debugfs_info;
		if (dfs && dfs->root)
			debugfs_remove_recursive(dfs->root);
		kfree(dfs);
		pdata = pdata->next;
	} while (pdata);
	pr_debug("%s: Cleaned up mdss_dsi_debugfs_info\n", __func__);
+1 −0
Original line number Diff line number Diff line
@@ -1258,6 +1258,7 @@ static int mdss_fb_remove(struct platform_device *pdev)
		return -EINVAL;

	mdss_fb_unregister_input_handler(mfd);
	mdss_panel_debugfs_cleanup(mfd->panel_info);

	if (mdss_fb_suspend_sub(mfd))
		pr_err("msm_fb_remove: can't stop the device %d\n",
+8 −2
Original line number Diff line number Diff line
@@ -455,10 +455,12 @@ int mdss_panel_debugfs_setup(struct mdss_panel_info *panel_info, struct dentry
		return -ENOMEM;
	}

	debugfs_info->parent = parent;
	debugfs_info->root = debugfs_create_dir(intf_str, parent);
	if (IS_ERR_OR_NULL(debugfs_info->root)) {
		pr_err("Debugfs create dir failed with error: %ld\n",
					PTR_ERR(debugfs_info->root));
		kfree(debugfs_info);
		return -ENODEV;
	}

@@ -503,6 +505,7 @@ int mdss_panel_debugfs_init(struct mdss_panel_info *panel_info,
				intf_str);
		if (rc) {
			pr_err("error in initilizing panel debugfs\n");
			mdss_panel_debugfs_cleanup(&pdata->panel_info);
			return rc;
		}
		pdata = pdata->next;
@@ -516,13 +519,16 @@ void mdss_panel_debugfs_cleanup(struct mdss_panel_info *panel_info)
{
	struct mdss_panel_data *pdata;
	struct mdss_panel_debugfs_info *debugfs_info;
	struct dentry *parent = NULL;
	pdata = container_of(panel_info, struct mdss_panel_data, panel_info);
	do {
		debugfs_info = pdata->panel_info.debugfs_info;
		if (debugfs_info && debugfs_info->root)
			debugfs_remove_recursive(debugfs_info->root);
		if (debugfs_info && !parent)
			parent = debugfs_info->parent;
		kfree(debugfs_info);
		pdata = pdata->next;
	} while (pdata);
	debugfs_remove_recursive(parent);
	pr_debug("Cleaned up mdss_panel_debugfs_info\n");
}

+1 −0
Original line number Diff line number Diff line
@@ -784,6 +784,7 @@ struct mdss_panel_data {

struct mdss_panel_debugfs_info {
	struct dentry *root;
	struct dentry *parent;
	struct mdss_panel_info panel_info;
	u32 override_flag;
	struct mdss_panel_debugfs_info *next;