diff options
| -rw-r--r-- | drivers/gpio/pl061.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/gpio/pl061.c b/drivers/gpio/pl061.c index aa8e7cb020d9..80e483986699 100644 --- a/drivers/gpio/pl061.c +++ b/drivers/gpio/pl061.c | |||
| @@ -221,7 +221,7 @@ static int __init pl061_probe(struct amba_device *dev, struct amba_id *id) | |||
| 221 | struct pl061_gpio *chip; | 221 | struct pl061_gpio *chip; |
| 222 | struct list_head *chip_list; | 222 | struct list_head *chip_list; |
| 223 | int ret, irq, i; | 223 | int ret, irq, i; |
| 224 | static unsigned long init_irq[BITS_TO_LONGS(NR_IRQS)]; | 224 | static DECLARE_BITMAP(init_irq, NR_IRQS); |
| 225 | 225 | ||
| 226 | pdata = dev->dev.platform_data; | 226 | pdata = dev->dev.platform_data; |
| 227 | if (pdata == NULL) | 227 | if (pdata == NULL) |
| @@ -280,6 +280,7 @@ static int __init pl061_probe(struct amba_device *dev, struct amba_id *id) | |||
| 280 | if (!test_and_set_bit(irq, init_irq)) { /* list initialized? */ | 280 | if (!test_and_set_bit(irq, init_irq)) { /* list initialized? */ |
| 281 | chip_list = kmalloc(sizeof(*chip_list), GFP_KERNEL); | 281 | chip_list = kmalloc(sizeof(*chip_list), GFP_KERNEL); |
| 282 | if (chip_list == NULL) { | 282 | if (chip_list == NULL) { |
| 283 | clear_bit(irq, init_irq); | ||
| 283 | ret = -ENOMEM; | 284 | ret = -ENOMEM; |
| 284 | goto iounmap; | 285 | goto iounmap; |
| 285 | } | 286 | } |
