diff options
author | Scott Williams <scwilliams@nvidia.com> | 2010-05-20 17:07:50 -0700 |
---|---|---|
committer | Gary King <gking@nvidia.com> | 2010-06-11 15:20:02 -0700 |
commit | 4897bc60f486bdb4a4f872978b1513579ebe997a (patch) | |
tree | 58ab625a08aa42252c036b5695eb3b1a53650d74 /arch/arm/mach-tegra/nvrm | |
parent | f13c9498cc92e896028e183cb47e81a029759baa (diff) |
tegra: Fix potential data abort if module doesn't exist
This is a port of change 1465 from android-tegra-2.6.29.
Change-Id: Ibca32ecc0424fae28e4db04977722f7d7a6c6938
Reviewed-on: http://git-master/r/2502
Reviewed-by: Gary King <gking@nvidia.com>
Tested-by: Gary King <gking@nvidia.com>
Diffstat (limited to 'arch/arm/mach-tegra/nvrm')
-rw-r--r-- | arch/arm/mach-tegra/nvrm/core/common/nvrm_module.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/arm/mach-tegra/nvrm/core/common/nvrm_module.c b/arch/arm/mach-tegra/nvrm/core/common/nvrm_module.c index 6d9bd1b2ea72..151a5d5a61b6 100644 --- a/arch/arm/mach-tegra/nvrm/core/common/nvrm_module.c +++ b/arch/arm/mach-tegra/nvrm/core/common/nvrm_module.c @@ -400,9 +400,9 @@ NvRmModuleGetBaseAddress( NvRmDeviceHandle hDevice, ); if (pBaseAddress) - *pBaseAddress = inst->PhysAddr; + *pBaseAddress = inst ? inst->PhysAddr : 0; if (pSize) - *pSize = inst->Length; + *pSize = inst ? inst->Length : 0; } NvU32 |