Skip to content

Commit

Permalink
Revert "backlight: fix memory leak on obscure error path"
Browse files Browse the repository at this point in the history
This reverts commit 9ea3c49.

'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>
  • Loading branch information
Jiri Kosina committed Jul 30, 2012
1 parent d14b7a4 commit e1c9ac4
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion drivers/video/backlight/88pm860x_bl.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit e1c9ac4

Please sign in to comment.