summaryrefslogtreecommitdiffstats
path: root/drivers/spi/spi-stm32.c
diff options
context:
space:
mode:
authorIngo Molnar <mingo@kernel.org>2017-11-07 04:32:44 -0500
committerIngo Molnar <mingo@kernel.org>2017-11-07 04:32:44 -0500
commit8c5db92a705d9e2c986adec475980d1120fa07b4 (patch)
tree9f0eea56889819707c0a1a8eb5b1fb2db3cdaf3d /drivers/spi/spi-stm32.c
parentca5d376e17072c1b60c3fee66f3be58ef018952d (diff)
parente4880bc5dfb1f02b152e62a894b5c6f3e995b3cf (diff)
Merge branch 'linus' into locking/core, to resolve conflicts
Conflicts: include/linux/compiler-clang.h include/linux/compiler-gcc.h include/linux/compiler-intel.h include/uapi/linux/stddef.h Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'drivers/spi/spi-stm32.c')
-rw-r--r--drivers/spi/spi-stm32.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/spi/spi-stm32.c b/drivers/spi/spi-stm32.c
index 680cdf549506..ba9743fa2326 100644
--- a/drivers/spi/spi-stm32.c
+++ b/drivers/spi/spi-stm32.c
@@ -263,8 +263,8 @@ static int stm32_spi_prepare_mbr(struct stm32_spi *spi, u32 speed_hz)
263 * no need to check it there. 263 * no need to check it there.
264 * However, we need to ensure the following calculations. 264 * However, we need to ensure the following calculations.
265 */ 265 */
266 if ((div < SPI_MBR_DIV_MIN) && 266 if (div < SPI_MBR_DIV_MIN ||
267 (div > SPI_MBR_DIV_MAX)) 267 div > SPI_MBR_DIV_MAX)
268 return -EINVAL; 268 return -EINVAL;
269 269
270 /* Determine the first power of 2 greater than or equal to div */ 270 /* Determine the first power of 2 greater than or equal to div */