summaryrefslogtreecommitdiffstats
path: root/drivers/irqchip/irq-renesas-irqc.c
diff options
context:
space:
mode:
authorGeert Uytterhoeven <geert+renesas@glider.be>2014-10-01 20:38:17 +0200
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2014-10-03 15:51:39 +0200
commita968bed78b549b4c61d4a46e59161fc1f60f96a6 (patch)
tree22f14101a8807bd8cbf80b9c52b689f498abe12c /drivers/irqchip/irq-renesas-irqc.c
parentfe82dcec644244676d55a1384c958d5f67979adb (diff)
PM / clk: Fix crash in clocks management code if !CONFIG_PM_RUNTIME
Unlike the clocks management code for runtime PM, the code used for system suspend does not check the pm_clock_entry.status field. If pm_clk_acquire() failed, ce->status will be PCE_STATUS_ERROR, and ce->clk will be a negative error code (e.g. 0xfffffffe = -2 = -ENOENT). Depending on the clock implementation, suspend or resume may crash with: Unable to handle kernel NULL pointer dereference at virtual address 00000026 (CCF clk_disable() has an IS_ERR_OR_NULL() check, while CCF clk_enable() only has a NULL check; pre-CCF implementations may behave differently) While just checking for PCE_STATUS_ERROR would be sufficient, it doesn't hurt to use the same state machine as is done for runtime PM, as this makes the two versions more similar, and eligible for a future consolidation. Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'drivers/irqchip/irq-renesas-irqc.c')
0 files changed, 0 insertions, 0 deletions