diff options
author | Scott Williams <scwilliams@nvidia.com> | 2010-05-20 17:07:50 -0700 |
---|---|---|
committer | Gary King <gking@nvidia.com> | 2010-05-24 19:18:38 -0700 |
commit | 2b46e5abd5b10caeb19e1dc0cd1af0c094e5de57 (patch) | |
tree | 51c2cb3d482899995cf557866f13d4cf05801537 /arch/arm/mach-tegra | |
parent | be03533498089ea4b434a868752eb938b50cd158 (diff) |
tegra: Fix potential data abort if module doesn't exist
Change-Id: I453606faa4edb4668a351dea8303ba83910923d1
Reviewed-on: http://git-master/r/1465
Reviewed-by: Scott Williams <scwilliams@nvidia.com>
Reviewed-by: Yu-Huan Hsu <yhsu@nvidia.com>
Reviewed-by: Gary King <gking@nvidia.com>
Tested-by: Gary King <gking@nvidia.com>
Diffstat (limited to 'arch/arm/mach-tegra')
-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 |