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

Commit c462c132 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: Add NULL check for kgsl_midframe before accessing it"

parents e4de6108 9ea3e6ff
Loading
Loading
Loading
Loading
+10 −6
Original line number Original line Diff line number Diff line
/* Copyright (c) 2010-2016, The Linux Foundation. All rights reserved.
/* Copyright (c) 2010-2017, The Linux Foundation. All rights reserved.
 *
 *
 * This program is free software; you can redistribute it and/or modify
 * 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
 * it under the terms of the GNU General Public License version 2 and
@@ -917,11 +917,15 @@ int kgsl_pwrscale_init(struct device *dev, const char *governor)
			"qcom,enable-midframe-timer")) {
			"qcom,enable-midframe-timer")) {
		kgsl_midframe = kzalloc(
		kgsl_midframe = kzalloc(
				sizeof(struct kgsl_midframe_info), GFP_KERNEL);
				sizeof(struct kgsl_midframe_info), GFP_KERNEL);
		if (kgsl_midframe) {
			hrtimer_init(&kgsl_midframe->timer,
			hrtimer_init(&kgsl_midframe->timer,
					CLOCK_MONOTONIC, HRTIMER_MODE_REL);
					CLOCK_MONOTONIC, HRTIMER_MODE_REL);
			kgsl_midframe->timer.function =
			kgsl_midframe->timer.function =
					kgsl_pwrscale_midframe_timer;
					kgsl_pwrscale_midframe_timer;
			kgsl_midframe->device = device;
			kgsl_midframe->device = device;
		} else
			KGSL_PWR_ERR(device,
				"Failed to enable-midframe-timer feature\n");
	}
	}


	/*
	/*