Skip to content
Snippets Groups Projects
Commit 4852615c authored by David Collins's avatar David Collins
Browse files

lrdp-v2: cpr3_info: ignore apm data structure when it is unused

Do not attempt to parse the APM data structure if the pointer to
it is null.

Change-Id: I2894c217a5deaafe1ded2a628ddeefa026ca030b
parent ca02b2b9
No related branches found
No related tags found
No related merge requests found
# Copyright (c) 2015-2016, The Linux Foundation. All rights reserved.
# Copyright (c) 2015-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
......@@ -218,6 +218,9 @@ class CPR3Info(RamParser):
if apm_thresh_volt == 0:
return
tmp = '%-30s = %d uV\n' % ("APM threshold", apm_thresh_volt)
if apm_addr == 0:
self.output.append(tmp)
return
apm_supply = self.ramdump.read_int(
apm_addr + self.ramdump.field_offset('struct msm_apm_ctrl_dev',
'supply'))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment