PM / devfreq: gpubw_mon: Add null check for governor private data
During SUSPEND event, check the pointer for governor private data is not NULL before updating bus parameters to zero. Change-Id: I1a37173e8ae7ad4bcd5f8497c5956302e647c862 Signed-off-by: Archana Sriram <apsrir@codeaurora.org>
This commit is contained in:
parent
eced530e1a
commit
7b8ec63c90
1 changed files with 6 additions and 5 deletions
|
|
@ -1,4 +1,4 @@
|
|||
/* Copyright (c) 2014-2017, The Linux Foundation. All rights reserved.
|
||||
/* Copyright (c) 2014-2018, 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
|
||||
|
|
@ -224,10 +224,11 @@ static int devfreq_gpubw_event_handler(struct devfreq *devfreq,
|
|||
case DEVFREQ_GOV_SUSPEND:
|
||||
{
|
||||
struct devfreq_msm_adreno_tz_data *priv = devfreq->data;
|
||||
|
||||
priv->bus.total_time = 0;
|
||||
priv->bus.gpu_time = 0;
|
||||
priv->bus.ram_time = 0;
|
||||
if (priv) {
|
||||
priv->bus.total_time = 0;
|
||||
priv->bus.gpu_time = 0;
|
||||
priv->bus.ram_time = 0;
|
||||
}
|
||||
}
|
||||
break;
|
||||
default:
|
||||
|
|
|
|||
Loading…
Reference in a new issue