Commit 68ba6eee authored by Matt Ranostay's avatar Matt Ranostay Committed by Jonathan Cameron

iio: chemical: atlas-ezo-sensor: move ret variable scope in atlas_ezo_read_raw()

Move ret variable to the IIO_CHAN_INFO_RAW switch since currently
only used within that scope.
Signed-off-by: default avatarMatt Ranostay <matt.ranostay@konsulko.com>
Signed-off-by: default avatarJonathan Cameron <Jonathan.Cameron@huawei.com>
parent 7d17577d
......@@ -69,13 +69,13 @@ static int atlas_ezo_read_raw(struct iio_dev *indio_dev,
{
struct atlas_ezo_data *data = iio_priv(indio_dev);
struct i2c_client *client = data->client;
int ret = 0;
if (chan->type != IIO_CONCENTRATION)
return -EINVAL;
switch (mask) {
case IIO_CHAN_INFO_RAW: {
int ret;
long tmp;
mutex_lock(&data->lock);
......@@ -110,7 +110,7 @@ static int atlas_ezo_read_raw(struct iio_dev *indio_dev,
return IIO_VAL_INT_PLUS_MICRO;
}
return ret;
return 0;
}
static const struct iio_info atlas_info = {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment