drivers: led: lp50xx: check the number of LED colors
The current code assumes (especially in the lp50xx_set_color function) that the number of LED colors defined in DT is not greater than 3. But since this is not checked, then this is not necessarily the case... This patch consolidates the initialization of the lp50xx LED driver by checking the number of colors for each LED found in DT. Signed-off-by:Simon Guinot <simon.guinot@sequanux.org> (cherry picked from commit ffbb8f98)
Loading
Please sign in to comment