Merge branch 'pm-sleep'
* pm-sleep: PM / wakeirq: check that wake IRQ is valid before accepting it
This commit is contained in:
commit
0aba0ab891
|
@ -68,6 +68,9 @@ int dev_pm_set_wake_irq(struct device *dev, int irq)
|
||||||
struct wake_irq *wirq;
|
struct wake_irq *wirq;
|
||||||
int err;
|
int err;
|
||||||
|
|
||||||
|
if (irq < 0)
|
||||||
|
return -EINVAL;
|
||||||
|
|
||||||
wirq = kzalloc(sizeof(*wirq), GFP_KERNEL);
|
wirq = kzalloc(sizeof(*wirq), GFP_KERNEL);
|
||||||
if (!wirq)
|
if (!wirq)
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
|
@ -167,6 +170,9 @@ int dev_pm_set_dedicated_wake_irq(struct device *dev, int irq)
|
||||||
struct wake_irq *wirq;
|
struct wake_irq *wirq;
|
||||||
int err;
|
int err;
|
||||||
|
|
||||||
|
if (irq < 0)
|
||||||
|
return -EINVAL;
|
||||||
|
|
||||||
wirq = kzalloc(sizeof(*wirq), GFP_KERNEL);
|
wirq = kzalloc(sizeof(*wirq), GFP_KERNEL);
|
||||||
if (!wirq)
|
if (!wirq)
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
|
|
Loading…
Reference in New Issue