From e1c9ac420ef15e39c2ead879cda1677d1e5cb2b6 Mon Sep 17 00:00:00 2001 From: Jiri Kosina Date: Mon, 30 Jul 2012 10:40:28 +0200 Subject: [PATCH] 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 Signed-off-by: Jiri Kosina --- drivers/video/backlight/88pm860x_bl.c | 1 - 1 file changed, 1 deletion(-) 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) data->port = pdata->flags; if (data->port < 0) { dev_err(&pdev->dev, "wrong platform data is assigned"); - kfree(data); return -EINVAL; } -- GitLab