diff options
author | Devendra Naga <devendra.aaru@gmail.com> | 2013-03-12 01:34:45 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-03-12 09:09:08 -0700 |
commit | 8dd4a9665280eafc042d6420f6a21bf0d20c19d9 (patch) | |
tree | b35d321a7a59d73b89872f731d3da43235b92e03 /drivers/staging/et131x | |
parent | f165d815d50f158be43aa12c5c800fd27bbecad3 (diff) | |
download | linux-8dd4a9665280eafc042d6420f6a21bf0d20c19d9.tar.gz linux-8dd4a9665280eafc042d6420f6a21bf0d20c19d9.tar.bz2 linux-8dd4a9665280eafc042d6420f6a21bf0d20c19d9.zip |
staging: et131x: fix invalid fail after the call to eeprom_wait_ready
should be err < 0 instead of if (err) which actually the read register
value can be a positive number
Acked-by: Mark Einon <mark.einon@gmail.com>
Signed-off-by: Devendra Naga <devendra.aaru@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/et131x')
-rw-r--r-- | drivers/staging/et131x/et131x.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/staging/et131x/et131x.c b/drivers/staging/et131x/et131x.c index 42ae5e83f907..c7e9e1d6bf70 100644 --- a/drivers/staging/et131x/et131x.c +++ b/drivers/staging/et131x/et131x.c @@ -595,7 +595,7 @@ static int eeprom_write(struct et131x_adapter *adapter, u32 addr, u8 data) */ err = eeprom_wait_ready(pdev, NULL); - if (err) + if (err < 0) return err; /* 2. Write to the LBCIF Control Register: bit 7=1, bit 6=1, bit 3=0, @@ -709,7 +709,7 @@ static int eeprom_read(struct et131x_adapter *adapter, u32 addr, u8 *pdata) */ err = eeprom_wait_ready(pdev, NULL); - if (err) + if (err < 0) return err; /* Write to the LBCIF Control Register: bit 7=1, bit 6=0, bit 3=0, * and bits 1:0 both =0. Bit 5 should be set according to the type |