diff options
author | Julia Lawall <Julia.Lawall@lip6.fr> | 2012-10-04 20:12:59 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-10-05 14:04:54 -0400 |
commit | 66be0e5bf5f555742a14a14712b537470dd2ba7e (patch) | |
tree | cfcb610b921bfe71d481fc52c215cae31316b507 /drivers/video/backlight | |
parent | 56a2aba3c4c57ccbbb480f9e64e33aa752cb6a30 (diff) |
drivers/video/backlight/da9052_bl.c: drop devm_kfree of devm_kzalloc'd data
devm_kfree should not have to be explicitly used.
The semantic patch that fixes this problem is as follows:
(http://coccinelle.lip6.fr/)
// <smpl>
@@
expression x,d;
@@
x = devm_kzalloc(...)
...
?-devm_kfree(d,x);
// </smpl>
Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Acked-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/video/backlight')
-rw-r--r-- | drivers/video/backlight/da9052_bl.c | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/drivers/video/backlight/da9052_bl.c b/drivers/video/backlight/da9052_bl.c index 10485c927ac6..ac196181fe45 100644 --- a/drivers/video/backlight/da9052_bl.c +++ b/drivers/video/backlight/da9052_bl.c | |||
@@ -129,7 +129,6 @@ static int da9052_backlight_probe(struct platform_device *pdev) | |||
129 | &da9052_backlight_ops, &props); | 129 | &da9052_backlight_ops, &props); |
130 | if (IS_ERR(bl)) { | 130 | if (IS_ERR(bl)) { |
131 | dev_err(&pdev->dev, "Failed to register backlight\n"); | 131 | dev_err(&pdev->dev, "Failed to register backlight\n"); |
132 | devm_kfree(&pdev->dev, wleds); | ||
133 | return PTR_ERR(bl); | 132 | return PTR_ERR(bl); |
134 | } | 133 | } |
135 | 134 | ||
@@ -149,7 +148,6 @@ static int da9052_backlight_remove(struct platform_device *pdev) | |||
149 | wleds->state = DA9052_WLEDS_OFF; | 148 | wleds->state = DA9052_WLEDS_OFF; |
150 | da9052_adjust_wled_brightness(wleds); | 149 | da9052_adjust_wled_brightness(wleds); |
151 | backlight_device_unregister(bl); | 150 | backlight_device_unregister(bl); |
152 | devm_kfree(&pdev->dev, wleds); | ||
153 | 151 | ||
154 | return 0; | 152 | return 0; |
155 | } | 153 | } |