aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'drivers')
-rw-r--r--drivers/clk/clk-stm32f4.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/clk/clk-stm32f4.c b/drivers/clk/clk-stm32f4.c
index b9b12a742970..3f6f7ad39490 100644
--- a/drivers/clk/clk-stm32f4.c
+++ b/drivers/clk/clk-stm32f4.c
@@ -268,7 +268,7 @@ static int stm32f4_rcc_lookup_clk_idx(u8 primary, u8 secondary)
268 memcpy(table, stm32f42xx_gate_map, sizeof(table)); 268 memcpy(table, stm32f42xx_gate_map, sizeof(table));
269 269
270 /* only bits set in table can be used as indices */ 270 /* only bits set in table can be used as indices */
271 if (WARN_ON(secondary > 8 * sizeof(table) || 271 if (WARN_ON(secondary >= BITS_PER_BYTE * sizeof(table) ||
272 0 == (table[BIT_ULL_WORD(secondary)] & 272 0 == (table[BIT_ULL_WORD(secondary)] &
273 BIT_ULL_MASK(secondary)))) 273 BIT_ULL_MASK(secondary))))
274 return -EINVAL; 274 return -EINVAL;