]> git.karo-electronics.de Git - karo-tx-linux.git/commit
leds: lm3556: don't call kfree for the memory allocated by devm_kzalloc
authorAxel Lin <axel.lin@gmail.com>
Thu, 3 May 2012 05:44:24 +0000 (15:44 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Thu, 3 May 2012 05:46:47 +0000 (15:46 +1000)
commit712353603eb0f2b1ebe0ff3f6a7f193a8d596a38
tree79d2a4ca9935f28232610e0c40b3bea539543353
parenta6205a445c1651bb724418c57dc6d40c5a904abd
leds: lm3556: don't call kfree for the memory allocated by devm_kzalloc

The devm_* functions eliminate the need for manual resource releasing
and simplify error handling. Resources allocated by devm_* are freed
automatically on driver detach.

Thus adding kfree calls here will introduce double free bug.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Cc: Geon Si Jeong <gshark.jeong@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
drivers/leds/leds-lm3556.c