aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJiri Kosina <jkosina@suse.cz>2012-07-30 04:40:28 -0400
committerJiri Kosina <jkosina@suse.cz>2012-07-30 04:40:28 -0400
commite1c9ac420ef15e39c2ead879cda1677d1e5cb2b6 (patch)
tree2407e5a6c463e4a4a0e4063fbc4b693aee1362be
parentd14b7a419a664cd7c1c585c9e7fffee9e9051d53 (diff)
Revert "backlight: fix memory leak on obscure error path"
This reverts commit 9ea3c498962bc63748e92c31c874169ab0726324. 'data' is being allocated by devm_kzalloc(), is it's actually wrong to free() it in the error path, as it will be destroyed properly later. Reported-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
-rw-r--r--drivers/video/backlight/88pm860x_bl.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/drivers/video/backlight/88pm860x_bl.c b/drivers/video/backlight/88pm860x_bl.c
index f75da8758adc..f49181c73113 100644
--- a/drivers/video/backlight/88pm860x_bl.c
+++ b/drivers/video/backlight/88pm860x_bl.c
@@ -228,7 +228,6 @@ static int pm860x_backlight_probe(struct platform_device *pdev)
228 data->port = pdata->flags; 228 data->port = pdata->flags;
229 if (data->port < 0) { 229 if (data->port < 0) {
230 dev_err(&pdev->dev, "wrong platform data is assigned"); 230 dev_err(&pdev->dev, "wrong platform data is assigned");
231 kfree(data);
232 return -EINVAL; 231 return -EINVAL;
233 } 232 }
234 233