Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

staging: iio: light: fix multiple assignments in a single line

Rewrite the multiple assignments to clear checkpatch check:

CHECK: multiple assignments should be avoided

Signed-off-by: Eva Rachel Retuya <eraretuya@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Eva Rachel Retuya and committed by
Greg Kroah-Hartman
ddab4a02 e537daa1

+4 -2
+4 -2
drivers/staging/iio/light/tsl2583.c
··· 267 267 268 268 if (!ch0) { 269 269 /* have no data, so return LAST VALUE */ 270 - ret = chip->als_cur_info.lux = 0; 270 + ret = 0; 271 + chip->als_cur_info.lux = 0; 271 272 goto out_unlock; 272 273 } 273 274 /* calculate ratio */ ··· 293 292 /* note: lux is 31 bit max at this point */ 294 293 if (ch1lux > ch0lux) { 295 294 dev_dbg(&chip->client->dev, "No Data - Return last value\n"); 296 - ret = chip->als_cur_info.lux = 0; 295 + ret = 0; 296 + chip->als_cur_info.lux = 0; 297 297 goto out_unlock; 298 298 } 299 299