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)
commited9125566b80af9f944fdbc69bb3720f786324cb
tree3dc09a8ad43daa614032f29a80dd0537349c980f
parent043c1da79472d7b030a4f7df40e2889e15c979a5
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