Skip to content

Commit

Permalink
Merge branch 'pm-sleep'
Browse files Browse the repository at this point in the history
* pm-sleep:
  PM / wakeirq: check that wake IRQ is valid before accepting it
  • Loading branch information
Rafael J. Wysocki committed Nov 20, 2015
2 parents 9832bf3 + 6f9b36c commit 0aba0ab
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions drivers/base/power/wakeirq.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit 0aba0ab

Please sign in to comment.