diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2011-11-15 14:45:50 -0200 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-11-15 14:45:50 -0200 |
commit | 80f01ca1fce2d5045b98f01989017767339b8700 (patch) | |
tree | 8899dbaa2949b8f2c6e83b65cd35669d9e85a462 /drivers/gpio/gpio-pca953x.c | |
parent | fc21a2dd371806aed818e2ec0dfcb55dc7448a98 (diff) | |
parent | a59024f1ecb52972b9be5ee91b5ef38a6b263d1b (diff) | |
download | linux-stable-80f01ca1fce2d5045b98f01989017767339b8700.tar.gz linux-stable-80f01ca1fce2d5045b98f01989017767339b8700.tar.bz2 linux-stable-80f01ca1fce2d5045b98f01989017767339b8700.zip |
Merge branch 'gpio/merge' of git://git.secretlab.ca/git/linux-2.6
* 'gpio/merge' of git://git.secretlab.ca/git/linux-2.6:
gpio: pca953x: propagate the errno from the chip_init functions
gpio: pca953x: remove unneeded check for chip type
gpio/omap: check return value from irq_alloc_generic_chip
gpio/omap: replace MOD_REG_BIT macro with static inline
Diffstat (limited to 'drivers/gpio/gpio-pca953x.c')
-rw-r--r-- | drivers/gpio/gpio-pca953x.c | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/drivers/gpio/gpio-pca953x.c b/drivers/gpio/gpio-pca953x.c index 0550dcb85814..147df8ae79db 100644 --- a/drivers/gpio/gpio-pca953x.c +++ b/drivers/gpio/gpio-pca953x.c @@ -596,9 +596,6 @@ static int __devinit device_pca953x_init(struct pca953x_chip *chip, int invert) /* set platform specific polarity inversion */ ret = pca953x_write_reg(chip, PCA953X_INVERT, invert); - if (ret) - goto out; - return 0; out: return ret; } @@ -640,7 +637,7 @@ static int __devinit pca953x_probe(struct i2c_client *client, struct pca953x_platform_data *pdata; struct pca953x_chip *chip; int irq_base=0, invert=0; - int ret = 0; + int ret; chip = kzalloc(sizeof(struct pca953x_chip), GFP_KERNEL); if (chip == NULL) @@ -673,10 +670,10 @@ static int __devinit pca953x_probe(struct i2c_client *client, pca953x_setup_gpio(chip, id->driver_data & PCA_GPIO_MASK); if (chip->chip_type == PCA953X_TYPE) - device_pca953x_init(chip, invert); - else if (chip->chip_type == PCA957X_TYPE) - device_pca957x_init(chip, invert); + ret = device_pca953x_init(chip, invert); else + ret = device_pca957x_init(chip, invert); + if (ret) goto out_failed; ret = pca953x_irq_setup(chip, id, irq_base); |