diff options
| -rw-r--r-- | drivers/staging/triune/ts81001.c | 7 | 
1 files changed, 5 insertions, 2 deletions
| diff --git a/drivers/staging/triune/ts81001.c b/drivers/staging/triune/ts81001.c index ed6f8abc78f..85a56fe5b66 100644 --- a/drivers/staging/triune/ts81001.c +++ b/drivers/staging/triune/ts81001.c @@ -134,7 +134,10 @@ static int ts81001_write_i2c_blk(struct i2c_client * client, u8 reg_addr,   *    * This function reads the status from the device on the i2c bus. The    * ts81001 can be really slow to react, so we'll try again a few times - * before accepting failure.  + * before accepting failure. + * + * If we can't read a value, we return -1. This let's other parts of the + * system know that we failed to read status, and not change anything.   */  static int ts81001_get_status (struct ts81001 * ts) { @@ -153,7 +156,7 @@ static int ts81001_get_status (struct ts81001 * ts) {  		if (err <= 0) {  			olio_debug ("Error reading status from ts81001, err = %d\n",   				    err); -			state = err; +			state = -1;  		} else {  			state = (ts81001_state_t) data;  			break; |