1
0
Fork 0

[media] xc5000: properly report i2c write failures

The logic as written would *never* actually return an error condition,
since the loop would run until the counter hit zero but the check was
for a value less than zero.

Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
hifive-unleashed-5.1
Devin Heitmueller 2012-08-06 22:46:57 -03:00 committed by Mauro Carvalho Chehab
parent 7c287f1849
commit 0a3dabb15e
1 changed files with 1 additions and 1 deletions

View File

@ -343,7 +343,7 @@ static int xc_write_reg(struct xc5000_priv *priv, u16 regAddr, u16 i2cData)
}
}
}
if (WatchDogTimer < 0)
if (WatchDogTimer <= 0)
result = XC_RESULT_I2C_WRITE_FAILURE;
return result;