]> git.baikalelectronics.ru Git - kernel.git/commit
spi: Fix self assignment issue with ancillary->mode
authorColin Ian King <colin.king@canonical.com>
Wed, 23 Jun 2021 17:23:00 +0000 (18:23 +0100)
committerMark Brown <broonie@kernel.org>
Thu, 24 Jun 2021 18:29:57 +0000 (19:29 +0100)
commit190a9b444baba8f6cef9bd633291a029fac5c036
tree77d0269e361d2d9ef505ed45bcca93ff72405d90
parent810f7629b2de2464a73deac2c5fa51820c0ed0c9
spi: Fix self assignment issue with ancillary->mode

There is an assignment of ancillary->mode to itself which looks
dubious since the proceeding comment states that the speed and
mode is taken over from the SPI main device, indicating that
ancillary->mode should assigned using the value spi->mode.
Fix this.

Addresses-Coverity: ("Self assignment")
Fixes: feae1939868a ("spi: add ancillary device support")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Link: https://lore.kernel.org/r/20210623172300.161484-1-colin.king@canonical.com
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/spi/spi.c