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

Commit 3f8c0108 authored by Shashank Mittal's avatar Shashank Mittal Committed by Gerrit - the friendly Code Review server
Browse files

coresight-tpdm: fix multiple datasets allocation issue



TPDM driver is allocating memory for TPDM datasets at two places which
leads to a memory leak issue.

Fix this issue by getting rid of one allocation call.

Change-Id: I9ac26cabe09dcbabeafd5a14aa85fc59a966d4dd
Signed-off-by: default avatarSaranya Chidura <schidura@codeaurora.org>
parent 10a55a58
Loading
Loading
Loading
Loading
+1 −7
Original line number Diff line number Diff line
/* Copyright (c) 2014-2016, The Linux Foundation. All rights reserved.
/* Copyright (c) 2014-2017, The Linux Foundation. All rights reserved.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 and
@@ -3725,12 +3725,6 @@ static int tpdm_probe(struct platform_device *pdev)

	clk_disable_unprepare(drvdata->clk);

	ret = tpdm_datasets_alloc(drvdata);
	if (ret)
		return ret;

	tpdm_init_default_data(drvdata);

	drvdata->traceid = traceid++;

	desc = devm_kzalloc(dev, sizeof(*desc), GFP_KERNEL);