]> git.karo-electronics.de Git - karo-tx-linux.git/commit
drivers/leds/led-triggers.c: fix memory leak
authorMasakazu Mokuno <Masakazu.Mokuno@jp.sony.com>
Wed, 28 Sep 2011 00:50:43 +0000 (10:50 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Fri, 30 Sep 2011 04:53:39 +0000 (14:53 +1000)
commit99b6782eedc9413ffb237a0bd1571303dce8bfa4
tree02be615c92957a1e69f5028335ffafb414680cdf
parent75c4a58b8c6dc1527c1460d0778441dc83f1325e
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: Masakazu Mokuno <mokuno@sm.sony.co.jp>
Cc: Richard Purdie <rpurdie@rpsys.net>
Signed-off-by: Andrew Morton <>
drivers/leds/led-triggers.c