diff options
author | Jean Delvare <khali@linux-fr.org> | 2012-01-12 14:32:03 -0500 |
---|---|---|
committer | Jean Delvare <khali@endymion.delvare> | 2012-01-12 14:32:03 -0500 |
commit | 7c1f59c9d5caf3a84f35549b5d58f3c055a68da5 (patch) | |
tree | ff3ff814f1c2cbf7e5cd6244d9c5e4ddd5b4e2bd /drivers/i2c/busses/i2c-sis5595.c | |
parent | a429638cac1e5c656818a45aaff78df7b743004e (diff) |
i2c: Fix error value returned by several bus drivers
When adding checks for ACPI resource conflicts to many bus drivers,
not enough attention was paid to the error paths, and for several
drivers this causes 0 to be returned on error in some cases. Fix this
by properly returning a non-zero value on every error.
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Cc: stable@kernel.org
Diffstat (limited to 'drivers/i2c/busses/i2c-sis5595.c')
-rw-r--r-- | drivers/i2c/busses/i2c-sis5595.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/i2c/busses/i2c-sis5595.c b/drivers/i2c/busses/i2c-sis5595.c index 437586611d4a..6d60284cc04b 100644 --- a/drivers/i2c/busses/i2c-sis5595.c +++ b/drivers/i2c/busses/i2c-sis5595.c | |||
@@ -147,7 +147,7 @@ static int __devinit sis5595_setup(struct pci_dev *SIS5595_dev) | |||
147 | u16 a; | 147 | u16 a; |
148 | u8 val; | 148 | u8 val; |
149 | int *i; | 149 | int *i; |
150 | int retval = -ENODEV; | 150 | int retval; |
151 | 151 | ||
152 | /* Look for imposters */ | 152 | /* Look for imposters */ |
153 | for (i = blacklist; *i != 0; i++) { | 153 | for (i = blacklist; *i != 0; i++) { |
@@ -223,7 +223,7 @@ static int __devinit sis5595_setup(struct pci_dev *SIS5595_dev) | |||
223 | 223 | ||
224 | error: | 224 | error: |
225 | release_region(sis5595_base + SMB_INDEX, 2); | 225 | release_region(sis5595_base + SMB_INDEX, 2); |
226 | return retval; | 226 | return -ENODEV; |
227 | } | 227 | } |
228 | 228 | ||
229 | static int sis5595_transaction(struct i2c_adapter *adap) | 229 | static int sis5595_transaction(struct i2c_adapter *adap) |