leds: ss4200: Fix the wrong format specifier for 'blinking'
authorZhu Jun <zhujun2@cmss.chinamobile.com>
Mon, 11 Nov 2024 06:58:09 +0000 (22:58 -0800)
committerLee Jones <lee@kernel.org>
Tue, 12 Nov 2024 14:39:26 +0000 (14:39 +0000)
The format specifier of "signed int" in sprintf() should be "%d", not
"%u".

Signed-off-by: Zhu Jun <zhujun2@cmss.chinamobile.com>
Link: https://lore.kernel.org/r/20241111065809.3814-1-zhujun2@cmss.chinamobile.com
Signed-off-by: Lee Jones <lee@kernel.org>
drivers/leds/leds-ss4200.c

index 2ef9fc7..f24ca75 100644 (file)
@@ -451,7 +451,7 @@ static ssize_t blink_show(struct device *dev,
        int blinking = 0;
        if (nasgpio_led_get_attr(led, GPO_BLINK))
                blinking = 1;
-       return sprintf(buf, "%u\n", blinking);
+       return sprintf(buf, "%d\n", blinking);
 }
 
 static ssize_t blink_store(struct device *dev,