diff options
author | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2015-11-20 01:22:33 +0100 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2015-11-20 01:22:33 +0100 |
commit | 0aba0ab8915bcad3ae7e05e18bc2c5c55570e328 (patch) | |
tree | a0b47b29720fd77da240d1b32cd9c61ebf574c9d /drivers/base | |
parent | Merge branches 'pm-cpufreq' and 'acpi-cppc' (diff) | |
parent | PM / wakeirq: check that wake IRQ is valid before accepting it (diff) | |
download | linux-0aba0ab8915bcad3ae7e05e18bc2c5c55570e328.tar.xz linux-0aba0ab8915bcad3ae7e05e18bc2c5c55570e328.zip |
Merge branch 'pm-sleep'
* pm-sleep:
PM / wakeirq: check that wake IRQ is valid before accepting it
Diffstat (limited to 'drivers/base')
-rw-r--r-- | drivers/base/power/wakeirq.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/base/power/wakeirq.c b/drivers/base/power/wakeirq.c index eb6e67451dec..0d77cd6fd8d1 100644 --- a/drivers/base/power/wakeirq.c +++ b/drivers/base/power/wakeirq.c @@ -68,6 +68,9 @@ int dev_pm_set_wake_irq(struct device *dev, int irq) struct wake_irq *wirq; int err; + if (irq < 0) + return -EINVAL; + wirq = kzalloc(sizeof(*wirq), GFP_KERNEL); if (!wirq) return -ENOMEM; @@ -167,6 +170,9 @@ int dev_pm_set_dedicated_wake_irq(struct device *dev, int irq) struct wake_irq *wirq; int err; + if (irq < 0) + return -EINVAL; + wirq = kzalloc(sizeof(*wirq), GFP_KERNEL); if (!wirq) return -ENOMEM; |