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

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

Merge "msm: kgsl: Fix gpudev NULL dereference in adreno_remove"

parents 1524a9c4 bccd0761
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -1013,13 +1013,14 @@ static void _adreno_free_memories(struct adreno_device *adreno_dev)
static int adreno_remove(struct platform_device *pdev)
{
	struct adreno_device *adreno_dev = adreno_get_dev(pdev);
	struct adreno_gpudev *gpudev = ADRENO_GPU_DEVICE(adreno_dev);
	struct adreno_gpudev *gpudev;
	struct kgsl_device *device;

	if (adreno_dev == NULL)
		return 0;

	device = KGSL_DEVICE(adreno_dev);
	gpudev = ADRENO_GPU_DEVICE(adreno_dev);

	if (gpudev->remove != NULL)
		gpudev->remove(adreno_dev);