aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpio/gpio-pca953x.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpio/gpio-pca953x.c')
-rw-r--r--drivers/gpio/gpio-pca953x.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/drivers/gpio/gpio-pca953x.c b/drivers/gpio/gpio-pca953x.c
index 45de6a4ac632..a3fef0c94ba6 100644
--- a/drivers/gpio/gpio-pca953x.c
+++ b/drivers/gpio/gpio-pca953x.c
@@ -595,9 +595,6 @@ static int __devinit device_pca953x_init(struct pca953x_chip *chip, int invert)
595 595
596 /* set platform specific polarity inversion */ 596 /* set platform specific polarity inversion */
597 ret = pca953x_write_reg(chip, PCA953X_INVERT, invert); 597 ret = pca953x_write_reg(chip, PCA953X_INVERT, invert);
598 if (ret)
599 goto out;
600 return 0;
601out: 598out:
602 return ret; 599 return ret;
603} 600}
@@ -639,7 +636,7 @@ static int __devinit pca953x_probe(struct i2c_client *client,
639 struct pca953x_platform_data *pdata; 636 struct pca953x_platform_data *pdata;
640 struct pca953x_chip *chip; 637 struct pca953x_chip *chip;
641 int irq_base=0, invert=0; 638 int irq_base=0, invert=0;
642 int ret = 0; 639 int ret;
643 640
644 chip = kzalloc(sizeof(struct pca953x_chip), GFP_KERNEL); 641 chip = kzalloc(sizeof(struct pca953x_chip), GFP_KERNEL);
645 if (chip == NULL) 642 if (chip == NULL)
@@ -672,9 +669,11 @@ static int __devinit pca953x_probe(struct i2c_client *client,
672 pca953x_setup_gpio(chip, id->driver_data & PCA_GPIO_MASK); 669 pca953x_setup_gpio(chip, id->driver_data & PCA_GPIO_MASK);
673 670
674 if (chip->chip_type == PCA953X_TYPE) 671 if (chip->chip_type == PCA953X_TYPE)
675 device_pca953x_init(chip, invert); 672 ret = device_pca953x_init(chip, invert);
676 else 673 else
677 device_pca957x_init(chip, invert); 674 ret = device_pca957x_init(chip, invert);
675 if (ret)
676 goto out_failed;
678 677
679 ret = pca953x_irq_setup(chip, id, irq_base); 678 ret = pca953x_irq_setup(chip, id, irq_base);
680 if (ret) 679 if (ret)