Error was detected by PVS-Studio: V792 The '__gpio_cansleep' function located to the right of the operator '|' will be called regardless of the value of the left operand. Perhaps, it is better to use '||'. Signed-off-by: Oleh Kravchenko <oleg@xxxxxxxxxx> --- drivers/leds/leds-ns2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/leds/leds-ns2.c b/drivers/leds/leds-ns2.c index 7c500dfdcfa3..8ae60133a15e 100644 --- a/drivers/leds/leds-ns2.c +++ b/drivers/leds/leds-ns2.c @@ -205,7 +205,7 @@ create_ns2_led(struct platform_device *pdev, struct ns2_led_data *led_dat, led_dat->cdev.groups = ns2_led_groups; led_dat->cmd = template->cmd; led_dat->slow = template->slow; - led_dat->can_sleep = gpio_cansleep(led_dat->cmd) | + led_dat->can_sleep = gpio_cansleep(led_dat->cmd) && gpio_cansleep(led_dat->slow); if (led_dat->can_sleep) led_dat->cdev.brightness_set_blocking = ns2_led_set_blocking; -- 2.21.0