diff options
Diffstat (limited to 'drivers/gpio/gpio-sx150x.c')
-rw-r--r-- | drivers/gpio/gpio-sx150x.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/drivers/gpio/gpio-sx150x.c b/drivers/gpio/gpio-sx150x.c index b51ca9f5c140..bce6c6108f20 100644 --- a/drivers/gpio/gpio-sx150x.c +++ b/drivers/gpio/gpio-sx150x.c | |||
@@ -615,19 +615,16 @@ static int sx150x_probe(struct i2c_client *client, | |||
615 | 615 | ||
616 | return 0; | 616 | return 0; |
617 | probe_fail_post_gpiochip_add: | 617 | probe_fail_post_gpiochip_add: |
618 | WARN_ON(gpiochip_remove(&chip->gpio_chip) < 0); | 618 | gpiochip_remove(&chip->gpio_chip); |
619 | return rc; | 619 | return rc; |
620 | } | 620 | } |
621 | 621 | ||
622 | static int sx150x_remove(struct i2c_client *client) | 622 | static int sx150x_remove(struct i2c_client *client) |
623 | { | 623 | { |
624 | struct sx150x_chip *chip; | 624 | struct sx150x_chip *chip; |
625 | int rc; | ||
626 | 625 | ||
627 | chip = i2c_get_clientdata(client); | 626 | chip = i2c_get_clientdata(client); |
628 | rc = gpiochip_remove(&chip->gpio_chip); | 627 | gpiochip_remove(&chip->gpio_chip); |
629 | if (rc < 0) | ||
630 | return rc; | ||
631 | 628 | ||
632 | if (chip->irq_summary >= 0) | 629 | if (chip->irq_summary >= 0) |
633 | sx150x_remove_irq_chip(chip); | 630 | sx150x_remove_irq_chip(chip); |