Re: [PATCH] leds: mt6323: move period calculation

2020-08-09 Thread Pavel Machek
Hi! > Setting the delay_on/off means period needs to be recalculated > anyway. So move the period statements after this check. > > Fixes: 216ec6cc4c19 ("leds: Add LED support for MT6323 PMIC") Makes sense, thanks, applied. Best regards, P

[PATCH] leds: mt6323: move period calculation

2020-08-09 Thread trix
From: Tom Rix clang static analysis reports this problem leds-mt6323.c:275:12: warning: Division by zero duty_hw = MT6323_CAL_HW_DUTY(*delay_on, period); ^ This is because period can be 0. period = *delay_on + *delay_off; T