From 9ea3c498962bc63748e92c31c874169ab0726324 Mon Sep 17 00:00:00 2001 From: Martlin Ettl Date: Thu, 5 Jul 2012 17:58:46 +0100 Subject: [PATCH] backlight: fix memory leak on obscure error path Dredged out of bugzilla Reported-by: Martlin Ettl Resolves-bug: https://bugzilla.kernel.org/show_bug.cgi?id=15492 Signed-off-by: Alan Cox Signed-off-by: Jiri Kosina --- drivers/video/backlight/88pm860x_bl.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/video/backlight/88pm860x_bl.c b/drivers/video/backlight/88pm860x_bl.c index f49181c73113..f75da8758adc 100644 --- a/drivers/video/backlight/88pm860x_bl.c +++ b/drivers/video/backlight/88pm860x_bl.c @@ -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; }