drivers/leds/led-triggers.c: fix memory leak
The memory for struct led_trigger should be kfreed in the led_trigger_register() error path. Also this function should return NULL on error. Signed-off-by: NMasakazu Mokuno <mokuno@sm.sony.co.jp> Cc: Richard Purdie <rpurdie@rpsys.net> Signed-off-by: NAndrew Morton <akpm@linux-foundation.org> Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
Showing
想要评论请 注册 或 登录