[PATCH 3/3] leds: Don't treat the LED name as a format string

From: Ricardo Ribalda Delgado
Date: Mon Mar 30 2015 - 13:46:21 EST


From: Sakari Ailus <sakari.ailus@xxxxxx>

The LED name was wrongly interpreted as format string. Stop doing that.

Signed-off-by: Sakari Ailus <sakari.ailus@xxxxxxxxxxxxxxx>
Signed-off-by: Bryan Wu <cooloney@xxxxxxxxx>
Signed-off-by: Ricardo Ribalda Delgado <ricardo.ribalda@xxxxxxxxx>
---
drivers/leds/led-class.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/leds/led-class.c b/drivers/leds/led-class.c
index 82e3844..728681d 100644
--- a/drivers/leds/led-class.c
+++ b/drivers/leds/led-class.c
@@ -252,7 +252,7 @@ int led_classdev_register(struct device *parent, struct led_classdev *led_cdev)
return ret;

led_cdev->dev = device_create_with_groups(leds_class, parent, 0,
- led_cdev, led_cdev->groups, name);
+ led_cdev, led_cdev->groups, "%s", name);
if (IS_ERR(led_cdev->dev))
return PTR_ERR(led_cdev->dev);

--
2.1.4

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/