diff options
author | Gustavo A. R. Silva <gustavo@embeddedor.com> | 2018-10-03 17:55:22 +0200 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2018-10-04 15:33:55 +0100 |
commit | 2c1833767bd8d906489a91cbbcb151fe3b818b61 (patch) | |
tree | 2054e90795db59220a704cfbdd1871b0d88f471a /drivers/spi | |
parent | c24bfa8f21b59283580043dada19a6e943b6e426 (diff) | |
download | linux-2c1833767bd8d906489a91cbbcb151fe3b818b61.tar.gz linux-2c1833767bd8d906489a91cbbcb151fe3b818b61.tar.bz2 linux-2c1833767bd8d906489a91cbbcb151fe3b818b61.zip |
spi: pxa2xx: Rewrite switch code block in interrupt_transfer
Rewrite switch code block to directly do the expected number
of shifts in each case and have break statements.
Addresses-Coverity-ID: 1056539 ("Missing break in switch")
Suggested-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'drivers/spi')
-rw-r--r-- | drivers/spi/spi-pxa2xx.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/spi/spi-pxa2xx.c b/drivers/spi/spi-pxa2xx.c index fc9aac214239..d68f511a9ef1 100644 --- a/drivers/spi/spi-pxa2xx.c +++ b/drivers/spi/spi-pxa2xx.c @@ -665,9 +665,11 @@ static irqreturn_t interrupt_transfer(struct driver_data *drv_data) bytes_left = drv_data->rx_end - drv_data->rx; switch (drv_data->n_bytes) { case 4: - bytes_left >>= 1; + bytes_left >>= 2; + break; case 2: bytes_left >>= 1; + break; } rx_thre = pxa2xx_spi_get_rx_default_thre(drv_data); |