Skip to content

Commit

Permalink
staging:iio:tsl2563 Simplify exit path on error in read_interrupt_con…
Browse files Browse the repository at this point in the history
…fig.

A rather over complicated exit path given there is only one exit
route and nothing much is done after it.

Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Acked-by: Peter Meerwald <pmeerw@pmeerw.net>
  • Loading branch information
Jonathan Cameron committed Jan 26, 2013
1 parent a9e244f commit a722dcc
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions drivers/staging/iio/light/tsl2563.c
Original file line number Diff line number Diff line change
Expand Up @@ -672,11 +672,9 @@ static int tsl2563_read_interrupt_config(struct iio_dev *indio_dev,
TSL2563_CMD | TSL2563_REG_INT);
mutex_unlock(&chip->lock);
if (ret < 0)
goto error_ret;
ret = !!(ret & 0x30);
error_ret:
return ret;

return ret;
return !!(ret & 0x30);
}

static struct i2c_driver tsl2563_i2c_driver;
Expand Down

0 comments on commit a722dcc

Please sign in to comment.