Browse Source

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>
Jiri Kosina 13 years ago
parent
commit
e1c9ac420e
1 changed files with 0 additions and 1 deletions
  1. 0 1
      drivers/video/backlight/88pm860x_bl.c

+ 0 - 1
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;
 	}