From: Martlin Ettl Date: Thu, 5 Jul 2012 16:58:46 +0000 (+0100) Subject: backlight: fix memory leak on obscure error path X-Git-Tag: v3.6-rc1~118^2~15 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=9ea3c498962bc63748e92c31c874169ab0726324;p=profile%2Fivi%2Fkernel-x86-ivi.git 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 --- diff --git a/drivers/video/backlight/88pm860x_bl.c b/drivers/video/backlight/88pm860x_bl.c index f49181c..f75da87 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; }