Divide by 3*sizeof(u32) when computing array_size, since stm32_breakinput...
has 3 fields of type u32.
--- a/drivers/pwm/pwm-stm32.c
+++ b/drivers/pwm/pwm-stm32.c
@@ -544,7 +544,7 @@ static int stm32_pwm_probe_breakinputs(struct stm32_pwm *priv,
return -EINVAL;
priv->num_breakinputs = nb;
- array_size = nb * sizeof(struct stm32_breakinput) / sizeof(u32);
+ array_size = nb * sizeof(struct stm32_breakinput) / (3 * sizeof(u32));
struct stm32_breakinput {
u32 index;
u32 level;
u32 filter;
};