pwm: samsung: memory leak bugfix in pwm_samsung_free
authorSangjung Woo <sangjung.woo@samsung.com>
Tue, 5 Nov 2013 02:08:34 +0000 (11:08 +0900)
committerMarek Szyprowski <m.szyprowski@samsung.com>
Thu, 15 May 2014 05:25:28 +0000 (07:25 +0200)
commitdc92849264e8978cdf3b53ecce76d610500d91bc
treed83861374106b20aecbd712fe6779a063635900f
parent65edb7a57f10ae728f3ce89c057b4da304775cd3
pwm: samsung: memory leak bugfix in pwm_samsung_free

There is certainly a kind of memory leak since allocated data (i.e.
chip_data) is set NULL before freeing it by calling devm_kfree().This
patch fixes the memory leak bug by modifying its call order.

Signed-off-by: Sangjung Woo <sangjung.woo@samsung.com>
Reviewed-by: Jonghwa Lee <jonghwa3.lee@samsung.com>
drivers/pwm/pwm-samsung.c