Skip to content

Commit

Permalink
backlight: fix memory leak on obscure error path
Browse files Browse the repository at this point in the history
Dredged out of bugzilla

Reported-by: Martlin Ettl <ettl.martin@gmx.de>
Resolves-bug: https://bugzilla.kernel.org/show_bug.cgi?id=15492
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
  • Loading branch information
Martlin Ettl authored and Jiri Kosina committed Jul 9, 2012
1 parent 59f91e5 commit 9ea3c49
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/video/backlight/88pm860x_bl.c
Original file line number Diff line number Diff line change
Expand Up @@ -228,6 +228,7 @@ 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 9ea3c49

Please sign in to comment.