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

Commit 80253232 authored by Carter Cooper's avatar Carter Cooper Committed by Nitheesh Muthuraj
Browse files

msm: kgsl: Clear ddr_table pointer after free



Clear the table pointer after it is freed to make sure
it doesn't get freed again.

Change-Id: Ica693a048fd76473a3937084c87f3631ef5b27dd
Signed-off-by: default avatarCarter Cooper <ccooper@codeaurora.org>
parent 6998de7d
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -163,6 +163,7 @@ int kgsl_bus_init(struct kgsl_device *device, struct platform_device *pdev)
		WARN(1, "The CPU has no way to set the GPU bus levels\n");

		kfree(pwr->ddr_table);
		pwr->ddr_table = NULL;
		return PTR_ERR(pwr->icc_path);
	}

@@ -172,5 +173,6 @@ int kgsl_bus_init(struct kgsl_device *device, struct platform_device *pdev)
void kgsl_bus_close(struct kgsl_device *device)
{
	kfree(device->pwrctrl.ddr_table);
	device->pwrctrl.ddr_table = NULL;
	icc_put(device->pwrctrl.icc_path);
}