spi: tegra210-quad: Fix iterator outside loop
authorKrishna Yarlagadda <kyarlagadda@nvidia.com>
Mon, 27 Feb 2023 20:04:28 +0000 (01:34 +0530)
committerMark Brown <broonie@kernel.org>
Tue, 28 Feb 2023 13:59:58 +0000 (13:59 +0000)
commit2449d436681d40bc63ec2c766fd51b632270d8a7
treef31742fe8a3109460854a57abd89eeaf6d2d755f
parent047ee71ae4f412d8819e39e4b08c588fa299cfc2
spi: tegra210-quad: Fix iterator outside loop

Fix warn: iterator used outside loop: 'xfer'. 'xfer' variable contain
invalid value in few conditions. Complete transfer within DATA phase
in successful case and at the end for failed transfer.

Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Link:https://lore.kernel.org/all/202210191211.46FkzKmv-lkp@intel.com/
Fixes: 8777dd9dff40 ("spi: tegra210-quad: Fix combined sequence")
Signed-off-by: Krishna Yarlagadda <kyarlagadda@nvidia.com>
Link: https://lore.kernel.org/r/20230227200428.45832-1-kyarlagadda@nvidia.com
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/spi/spi-tegra210-quad.c