mirror of
https://github.com/torvalds/linux
synced 2024-11-05 18:23:50 +00:00
iio: addac: stx104: Improve indentation in stx104_write_raw()
By bailing out early if chan->output is false for the IIO_CHAN_INFO_RAW, indentation can be decreased by a tab and code readability improved. Suggested-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: William Breathitt Gray <william.gray@linaro.org> Link: https://lore.kernel.org/r/487d17da9e2612f3e6b2bd1c3def2fa1b955db9b.1680790580.git.william.gray@linaro.org Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
This commit is contained in:
parent
46a4cac7f8
commit
a94abc74c5
1 changed files with 10 additions and 10 deletions
|
@ -181,7 +181,9 @@ static int stx104_write_raw(struct iio_dev *indio_dev,
|
|||
|
||||
return 0;
|
||||
case IIO_CHAN_INFO_RAW:
|
||||
if (chan->output) {
|
||||
if (!chan->output)
|
||||
return -EINVAL;
|
||||
|
||||
if (val < 0 || val > U16_MAX)
|
||||
return -EINVAL;
|
||||
|
||||
|
@ -193,8 +195,6 @@ static int stx104_write_raw(struct iio_dev *indio_dev,
|
|||
mutex_unlock(&priv->lock);
|
||||
return 0;
|
||||
}
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
return -EINVAL;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue