Skip to content

Commit

Permalink
drivers: ncp5623: Fix error check
Browse files Browse the repository at this point in the history
num_colors cannot be not equal to different values at the same time.

Signed-off-by: Andrei Emeltchenko <[email protected]>
  • Loading branch information
finikorg committed Oct 10, 2023
1 parent fc078f9 commit 71a2d3c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/led/ncp5623.c
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ static int ncp5623_led_init(const struct device *dev)
return -ENODEV;
}

if (led_info->num_colors != 3 || led_info->num_colors != 1) {
if (led_info->num_colors != 3 && led_info->num_colors != 1) {
LOG_ERR("%s: invalid number of colors %d (must be %d or 1)", dev->name,
led_info->num_colors, NCP5623_CHANNEL_COUNT);
}
Expand Down

0 comments on commit 71a2d3c

Please sign in to comment.