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

Commit 82f7cba8 authored by Harshdeep Dhatt's avatar Harshdeep Dhatt
Browse files

devfreq: Fix signedness of percentages array



It is possible that this array may contain a negative
value and if so, it is corrected using bounds checking.
However, bounds are not properly applied because the negative
value is seen as a very high unsigned integer.

Change-Id: I546d1ecacace185427d6fbf78e95bf8cb67f92c9
Signed-off-by: default avatarHarshdeep Dhatt <hdhatt@codeaurora.org>
parent 7eaf07a0
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
/* SPDX-License-Identifier: GPL-2.0 */
/*
 * Copyright (c) 2016-2017, The Linux Foundation. All rights reserved.
 * Copyright (c) 2016-2019, The Linux Foundation. All rights reserved.
 */

#ifndef MSM_ADRENO_DEVFREQ_H
@@ -52,8 +52,8 @@ struct devfreq_msm_adreno_tz_data {
		u32 width;
		u32 *up;
		u32 *down;
		u32 *p_up;
		u32 *p_down;
		s32 *p_up;
		s32 *p_down;
		unsigned int *index;
		uint64_t *ib;
	} bus;