Skip to content
Commit af81a8ba authored by Simon Guinot's avatar Simon Guinot Committed by Mahesh Mahadevan
Browse files

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: default avatarSimon Guinot <simon.guinot@sequanux.org>
(cherry picked from commit ffbb8f98)
parent 546386cd
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment