]> git.baikalelectronics.ru Git - kernel.git/commit
spi: spi-fsl-dspi: Remove impossible to reach error check
authorVladimir Oltean <olteanv@gmail.com>
Thu, 22 Aug 2019 21:15:12 +0000 (00:15 +0300)
committerMark Brown <broonie@kernel.org>
Fri, 23 Aug 2019 11:01:29 +0000 (12:01 +0100)
commit0d3f1af073a45da2dfc7c95869c57d837604940d
tree9c6341b92ccfbf85da177d8ac96140969c3ccb51
parentfbf90d09ee7b8e5c17ef717c6f3ece8bcdad85a0
spi: spi-fsl-dspi: Remove impossible to reach error check

dspi->devtype_data is under the total control of the driver. Therefore,
a bad value is a driver bug and checking it at runtime (and during an
ISR, at that!) is pointless.

The second "else if" check is only for clarity (instead of a broader
"else") in case other transfer modes are added in the future. But the
printing is dead code and can be removed.

Signed-off-by: Vladimir Oltean <olteanv@gmail.com>
Link: https://lore.kernel.org/r/20190822211514.19288-4-olteanv@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/spi/spi-fsl-dspi.c