projects
/
GitHub
/
moto-9609
/
android_kernel_motorola_exynos9610.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
66242f7
)
leds: Fix trigger unregister_simple if register_simple fails
author
Richard Purdie
<rpurdie@rpsys.net>
Thu, 10 May 2007 22:46:30 +0000
(23:46 +0100)
committer
Richard Purdie
<rpurdie@rpsys.net>
Mon, 16 Jul 2007 00:15:50 +0000
(
01:15
+0100)
Fix led_trigger_unregister_simple to handle the case where
led_trigger_register_simple fails, avoiding a NULL pointer
dereference.
Signed-off-by: Richard Purdie <rpurdie@rpsys.net>
drivers/leds/led-triggers.c
patch
|
blob
|
blame
|
history
diff --git
a/drivers/leds/led-triggers.c
b/drivers/leds/led-triggers.c
index 454fb0901f8211dc31ec6b86e6edac5bec774286..129733f2379b06381f6257e257ae63b64ff0e049 100644
(file)
--- a/
drivers/leds/led-triggers.c
+++ b/
drivers/leds/led-triggers.c
@@
-215,7
+215,8
@@
void led_trigger_unregister(struct led_trigger *trigger)
void led_trigger_unregister_simple(struct led_trigger *trigger)
{
- led_trigger_unregister(trigger);
+ if (trigger)
+ led_trigger_unregister(trigger);
kfree(trigger);
}