diff options
author | Jacek Anaszewski <j.anaszewski@samsung.com> | 2016-09-19 12:44:50 +0200 |
---|---|---|
committer | Jacek Anaszewski <j.anaszewski@samsung.com> | 2016-09-20 10:22:10 +0200 |
commit | 6f3bad9670729ea3a7c78b3752a89c94ffa2397a (patch) | |
tree | c5a9cdbbc5f2bb25f9ebe2a10a294419c8a9e124 /drivers/leds/led-triggers.c | |
parent | fbfa197afddd13f9bdca1c822f5d5730b50639eb (diff) | |
download | linux-6f3bad9670729ea3a7c78b3752a89c94ffa2397a.tar.bz2 |
leds: triggers: Check return value of kobject_uevent_env()
Log error message if kobject_uevent_env() fails in led_trigger_set().
Signed-off-by: Jacek Anaszewski <j.anaszewski@samsung.com>
Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/leds/led-triggers.c')
-rw-r--r-- | drivers/leds/led-triggers.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/leds/led-triggers.c b/drivers/leds/led-triggers.c index c7a38d43ff62..431123b048a2 100644 --- a/drivers/leds/led-triggers.c +++ b/drivers/leds/led-triggers.c @@ -141,7 +141,9 @@ void led_trigger_set(struct led_classdev *led_cdev, struct led_trigger *trig) if (event) { envp[0] = event; envp[1] = NULL; - kobject_uevent_env(&led_cdev->dev->kobj, KOBJ_CHANGE, envp); + if (kobject_uevent_env(&led_cdev->dev->kobj, KOBJ_CHANGE, envp)) + dev_err(led_cdev->dev, + "%s: Error sending uevent\n", __func__); kfree(event); } } |