]> 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>
Wed, 25 Apr 2012 01:04:15 +0000 (11:04 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Mon, 30 Apr 2012 05:17:32 +0000 (15:17 +1000)
commitcc7ef3509250fd5453be3918a196b3786e9ae793
treee7891e68a6b46c8ebd679eef5a49039b679869a2
parentc8096113ede5f63f138fb683cfeefa950a342aca
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