diff options
Diffstat (limited to 'drivers/gpio/gpio-adnp.c')
-rw-r--r-- | drivers/gpio/gpio-adnp.c | 31 |
1 files changed, 14 insertions, 17 deletions
diff --git a/drivers/gpio/gpio-adnp.c b/drivers/gpio/gpio-adnp.c index 89863ea25de1..44c09904daa6 100644 --- a/drivers/gpio/gpio-adnp.c +++ b/drivers/gpio/gpio-adnp.c @@ -192,28 +192,20 @@ static void adnp_gpio_dbg_show(struct seq_file *s, struct gpio_chip *chip) mutex_lock(&adnp->i2c_lock); err = adnp_read(adnp, GPIO_DDR(adnp) + i, &ddr); - if (err < 0) { - mutex_unlock(&adnp->i2c_lock); - return; - } + if (err < 0) + goto unlock; err = adnp_read(adnp, GPIO_PLR(adnp) + i, &plr); - if (err < 0) { - mutex_unlock(&adnp->i2c_lock); - return; - } + if (err < 0) + goto unlock; err = adnp_read(adnp, GPIO_IER(adnp) + i, &ier); - if (err < 0) { - mutex_unlock(&adnp->i2c_lock); - return; - } + if (err < 0) + goto unlock; err = adnp_read(adnp, GPIO_ISR(adnp) + i, &isr); - if (err < 0) { - mutex_unlock(&adnp->i2c_lock); - return; - } + if (err < 0) + goto unlock; mutex_unlock(&adnp->i2c_lock); @@ -240,6 +232,11 @@ static void adnp_gpio_dbg_show(struct seq_file *s, struct gpio_chip *chip) direction, level, interrupt, pending); } } + + return; + +unlock: + mutex_unlock(&adnp->i2c_lock); } static int adnp_gpio_setup(struct adnp *adnp, unsigned int num_gpios) @@ -323,7 +320,7 @@ static irqreturn_t adnp_irq(int irq, void *data) for_each_set_bit(bit, &pending, 8) { unsigned int child_irq; - child_irq = irq_find_mapping(adnp->gpio.irqdomain, + child_irq = irq_find_mapping(adnp->gpio.irq.domain, base + bit); handle_nested_irq(child_irq); } |