Skip to content

Commit 6fcafd3

Browse files
Zhu Junlag-linaro
authored andcommitted
leds: ledtrig-activity: Fix the wrong format specifier
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/20241122064626.4680-1-zhujun2@cmss.chinamobile.com Signed-off-by: Lee Jones <lee@kernel.org>
1 parent 609bc99 commit 6fcafd3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/leds/trigger/ledtrig-activity.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ static ssize_t led_invert_show(struct device *dev,
156156
{
157157
struct activity_data *activity_data = led_trigger_get_drvdata(dev);
158158

159-
return sprintf(buf, "%u\n", activity_data->invert);
159+
return sprintf(buf, "%d\n", activity_data->invert);
160160
}
161161

162162
static ssize_t led_invert_store(struct device *dev,

0 commit comments

Comments
 (0)