mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/
synced 2026-11-10 20:48:12 +00:00
iio: light: ltr501: return proper error code from ltr501_get_gain_index()
Return -EINVAL instead of -1 when no matching gain value is found in the gain table. Update the callers to propagate this error directly rather than overwriting it with -EINVAL. Signed-off-by: Antoniu Miclaus <antoniu.miclaus@analog.com> Reviewed-by: Andy Shevchenko <andriy.shevchenko@intel.com> Reviewed-by: Waqar Hameed <waqar.hameed@axis.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
This commit is contained in:
parent
18a1ae3e73
commit
1ff6d25d69
1 changed files with 3 additions and 3 deletions
Loading…
Add table
Add a link
Reference in a new issue