diff options
author | Tom Cherry <tcherry@nvidia.com> | 2011-02-18 11:59:16 -0800 |
---|---|---|
committer | Varun Colbert <vcolbert@nvidia.com> | 2011-03-08 17:40:44 -0800 |
commit | e6098a9079c7a2e9d8a206cc1237726fae8b87e3 (patch) | |
tree | b9e9868f9d769cbe19240123edc1df759e956a9e /arch | |
parent | b514cec462faa2e29adc8c76e43acffcfca248f6 (diff) |
[arm/tegra] Check null pointer in suspend.c
In tegra_suspend_enter, we need to check mask() and unmask() for null
before calling them, since there is no guarantee irq chips other than
tegra will implement these functions.
Reviewed-on: http://git-master/r/20099
(cherry picked from commit 29c5018516f0ed614d886b42d0b74787d89147fc)
Change-Id: I704a595087f94f35ecd94d706319b152d58f6093
Reviewed-on: http://git-master/r/21978
Tested-by: Thomas Cherry <tcherry@nvidia.com>
Reviewed-by: Daniel Willemsen <dwillemsen@nvidia.com>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/arm/mach-tegra/suspend.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/arch/arm/mach-tegra/suspend.c b/arch/arm/mach-tegra/suspend.c index 146b93a014f3..8a3af04a1689 100644 --- a/arch/arm/mach-tegra/suspend.c +++ b/arch/arm/mach-tegra/suspend.c @@ -615,7 +615,8 @@ static int tegra_suspend_enter(suspend_state_t state) for_each_irq_desc(irq, desc) { if ((desc->status & IRQ_WAKEUP) && - (desc->status & IRQ_SUSPENDED)) { + (desc->status & IRQ_SUSPENDED) && + (get_irq_chip(irq)->unmask)) { get_irq_chip(irq)->unmask(irq); } } @@ -631,7 +632,8 @@ static int tegra_suspend_enter(suspend_state_t state) for_each_irq_desc(irq, desc) { if ((desc->status & IRQ_WAKEUP) && - (desc->status & IRQ_SUSPENDED)) { + (desc->status & IRQ_SUSPENDED) && + (get_irq_chip(irq)->mask)) { get_irq_chip(irq)->mask(irq); } } |