summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDeepak Kumar <dkumar@codeaurora.org>2017-01-25 18:53:55 +0530
committerDeepak Kumar <dkumar@codeaurora.org>2017-01-25 19:17:55 +0530
commit26c2644b34ffc4d5015e89379f20e05033691af3 (patch)
treef85d5ecad111bca68ab7834a59343e1281cde9aa
parent314869eb56763d34f91d5483b0d510267894fadd (diff)
adreno_tz: Correct tz_buf pointer type to correct pointer arithmetic
Current tz_buf pointer type is causing the end address calcultion of tz_buf to go wrong. "end_addr = tz_buf + PAGE_ALIGN(size)" is resulting in an end address way beyond the allocated range because tz_buf is of type unsigned int. This change changes the tz_buf pointer type to u8 to fix this issue. Change-Id: I16db09c565801b56c0c0ee8a8184f6e276512fa3 Signed-off-by: Deepak Kumar <dkumar@codeaurora.org>
-rw-r--r--drivers/devfreq/governor_msm_adreno_tz.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/devfreq/governor_msm_adreno_tz.c b/drivers/devfreq/governor_msm_adreno_tz.c
index 0276952debbb..de21a231b73f 100644
--- a/drivers/devfreq/governor_msm_adreno_tz.c
+++ b/drivers/devfreq/governor_msm_adreno_tz.c
@@ -1,4 +1,4 @@
-/* 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
* it under the terms of the GNU General Public License version 2 and
@@ -234,7 +234,7 @@ static int tz_init_ca(struct devfreq_msm_adreno_tz_data *priv)
{
unsigned int tz_ca_data[2];
struct scm_desc desc = {0};
- unsigned int *tz_buf;
+ u8 *tz_buf;
int ret;
/* Set data for TZ */
@@ -279,7 +279,7 @@ static int tz_init(struct devfreq_msm_adreno_tz_data *priv,
scm_is_call_available(SCM_SVC_DCVS, TZ_UPDATE_ID_64) &&
scm_is_call_available(SCM_SVC_DCVS, TZ_RESET_ID_64)) {
struct scm_desc desc = {0};
- unsigned int *tz_buf;
+ u8 *tz_buf;
if (!is_scm_armv8()) {
ret = scm_call(SCM_SVC_DCVS, TZ_INIT_ID_64,