diff options
Diffstat (limited to 'drivers/leds/led-class.c')
-rw-r--r-- | drivers/leds/led-class.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/leds/led-class.c b/drivers/leds/led-class.c index ee74ee7b2acc..8a7d138ec503 100644 --- a/drivers/leds/led-class.c +++ b/drivers/leds/led-class.c | |||
@@ -34,14 +34,11 @@ static ssize_t led_brightness_show(struct device *dev, | |||
34 | struct device_attribute *attr, char *buf) | 34 | struct device_attribute *attr, char *buf) |
35 | { | 35 | { |
36 | struct led_classdev *led_cdev = dev_get_drvdata(dev); | 36 | struct led_classdev *led_cdev = dev_get_drvdata(dev); |
37 | ssize_t ret = 0; | ||
38 | 37 | ||
39 | /* no lock needed for this */ | 38 | /* no lock needed for this */ |
40 | led_update_brightness(led_cdev); | 39 | led_update_brightness(led_cdev); |
41 | sprintf(buf, "%u\n", led_cdev->brightness); | ||
42 | ret = strlen(buf) + 1; | ||
43 | 40 | ||
44 | return ret; | 41 | return sprintf(buf, "%u\n", led_cdev->brightness); |
45 | } | 42 | } |
46 | 43 | ||
47 | static ssize_t led_brightness_store(struct device *dev, | 44 | static ssize_t led_brightness_store(struct device *dev, |