]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
spi: spi-loopback-test: Fix 'tx_buf' might be 'rx_buf'
authorJay Fang <f.fangjian@huawei.com>
Mon, 10 May 2021 06:58:23 +0000 (14:58 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 20 Jul 2021 14:15:43 +0000 (16:15 +0200)
[ Upstream commit 9e37a3ab0627011fb63875e9a93094b6fc8ddf48 ]

In function 'spi_test_run_iter': Value 'tx_buf' might be 'rx_buf'.

Signed-off-by: Jay Fang <f.fangjian@huawei.com>
Link: https://lore.kernel.org/r/1620629903-15493-5-git-send-email-f.fangjian@huawei.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/spi/spi-loopback-test.c

index b9a7117b6dce3b8262af4de10d166c0d6f6e316a..85d3475915dda5d3d3cb21c59a4dd1867e08cf7c 100644 (file)
@@ -877,7 +877,7 @@ static int spi_test_run_iter(struct spi_device *spi,
                test.transfers[i].len = len;
                if (test.transfers[i].tx_buf)
                        test.transfers[i].tx_buf += tx_off;
-               if (test.transfers[i].tx_buf)
+               if (test.transfers[i].rx_buf)
                        test.transfers[i].rx_buf += rx_off;
        }