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

drivers: w1: removed assignment from within if statement

Assignment of variable count removed from within an if statment.
This was done at two locations in the file.

Signed-off-by: Ben Werbowyj <ben.werbowyj@gmail.com>
Acked-by: Evgeniy Polyakov <zbr@ioremap.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Ben Werbowyj and committed by
Greg Kroah-Hartman
aaf16f7d d4c3f97a

+4 -2
+4 -2
drivers/w1/slaves/w1_therm.c
··· 335 335 336 336 /* read values to only alter precision bits */ 337 337 w1_write_8(dev, W1_READ_SCRATCHPAD); 338 - if ((count = w1_read_block(dev, rom, 9)) != 9) 338 + count = w1_read_block(dev, rom, 9); 339 + if (count != 9) 339 340 dev_warn(device, "w1_read_block() returned %u instead of 9.\n", count); 340 341 341 342 crc = w1_calc_crc8(rom, 8); ··· 494 493 if (!w1_reset_select_slave(sl)) { 495 494 496 495 w1_write_8(dev, W1_READ_SCRATCHPAD); 497 - if ((count = w1_read_block(dev, rom, 9)) != 9) { 496 + count = w1_read_block(dev, rom, 9); 497 + if (count != 9) { 498 498 dev_warn(device, "w1_read_block() " 499 499 "returned %u instead of 9.\n", 500 500 count);