diff options
Diffstat (limited to 'arch/arm/plat-s5p/irq-gpioint.c')
-rw-r--r-- | arch/arm/plat-s5p/irq-gpioint.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/arch/arm/plat-s5p/irq-gpioint.c b/arch/arm/plat-s5p/irq-gpioint.c index f71078ef6bb..f88216d2399 100644 --- a/arch/arm/plat-s5p/irq-gpioint.c +++ b/arch/arm/plat-s5p/irq-gpioint.c | |||
@@ -114,17 +114,18 @@ static __init int s5p_gpioint_add(struct s3c_gpio_chip *chip) | |||
114 | { | 114 | { |
115 | static int used_gpioint_groups = 0; | 115 | static int used_gpioint_groups = 0; |
116 | int group = chip->group; | 116 | int group = chip->group; |
117 | struct s5p_gpioint_bank *bank = NULL; | 117 | struct s5p_gpioint_bank *b, *bank = NULL; |
118 | struct irq_chip_generic *gc; | 118 | struct irq_chip_generic *gc; |
119 | struct irq_chip_type *ct; | 119 | struct irq_chip_type *ct; |
120 | 120 | ||
121 | if (used_gpioint_groups >= S5P_GPIOINT_GROUP_COUNT) | 121 | if (used_gpioint_groups >= S5P_GPIOINT_GROUP_COUNT) |
122 | return -ENOMEM; | 122 | return -ENOMEM; |
123 | 123 | ||
124 | list_for_each_entry(bank, &banks, list) { | 124 | list_for_each_entry(b, &banks, list) { |
125 | if (group >= bank->start && | 125 | if (group >= b->start && group < b->start + b->nr_groups) { |
126 | group < bank->start + bank->nr_groups) | 126 | bank = b; |
127 | break; | 127 | break; |
128 | } | ||
128 | } | 129 | } |
129 | if (!bank) | 130 | if (!bank) |
130 | return -EINVAL; | 131 | return -EINVAL; |