leds: fix unsigned value overflow in for loop
Subsystems (2)
PATCH 1/1 leds: fix unsigned value overflow in for loop
Fix the following unsigned variable overflow:
unsigned i; for (i = n; i >= 0; i--) ...
It won't break anything to use type 'int'.
Signed-off-by Li Zefan <[email protected]>
--- drivers/leds/leds-atmel-pwm.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/leds/leds-atmel-pwm.c +1 -1
@@ -37,7 +37,7 @@ static int __init pwmled_probe(struct platform_device *pdev) {const struct gpio_led_platform_data *pdata;struct pwmled *leds; -unsigned i; +int i;int status; pdata = pdev->dev.platform_data;
Signature · 1 line
1.5.4.rc3