]> git.baikalelectronics.ru Git - kernel.git/commit
staging: iio: tsl2583: moved code block inside else statement
authorBrian Masney <masneyb@onstation.org>
Sat, 12 Nov 2016 18:19:30 +0000 (13:19 -0500)
committerJonathan Cameron <jic23@kernel.org>
Sun, 13 Nov 2016 13:07:26 +0000 (13:07 +0000)
commite9ff9531736f8f54080b7445cc95a9a562d69179
tree3dc09a8ad43daa614032f29a80dd0537349c980f
parentf5edeca33d46fef0bac4c4a96a8e0ea362b051bc
staging: iio: tsl2583: moved code block inside else statement

The check for ch1lux > ch0lux inside tsl2583_get_lux is only valid if
the ratio is not equal to zero. Move the code block inside the else
statement. This does away with the need to initialize the variables to
zero.

Signed-off-by: Brian Masney <masneyb@onstation.org>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
drivers/staging/iio/light/tsl2583.c