]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
iio: light: vcnl4000: remove redundant check for proximity-near-level
authorErikas Bitovtas <xerikasxx@gmail.com>
Fri, 20 Mar 2026 16:45:42 +0000 (18:45 +0200)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Sat, 21 Mar 2026 12:40:30 +0000 (12:40 +0000)
commit5ec96d77ca28c0560e8883a0709ab63667eac19f
tree367d2a2997811c5431a2e38e481df6c030546f23
parentc4380f90752b8ad469e077658f378c9f454e429c
iio: light: vcnl4000: remove redundant check for proximity-near-level

The data->near_level variable is already assigned 0 during
devm_kzalloc(), therefore checking if the property is present and then
assigning it 0 is redundant. Remove the check for device tree property
and let it fail silently if it is missing or invalid.

Reviewed-by: David Lechner <dlechner@baylibre.com>
Signed-off-by: Erikas Bitovtas <xerikasxx@gmail.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@intel.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/iio/light/vcnl4000.c