From: Dan Carpenter Date: Fri, 7 May 2010 09:06:21 +0000 (+0200) Subject: backlight: 88pm860x_bl - potential memory leak X-Git-Tag: MMI-PSA29.97-13-9~23431^2~13 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=9844ce0501b03843c44156d6e36afb80e847c974;p=GitHub%2FMotorolaMobilityLLC%2Fkernel-slsi.git backlight: 88pm860x_bl - potential memory leak I added a kfree() on the error path. I don't really expect it to affect anyone, but it's easy and makes the static checkers happy. Signed-off-by: Dan Carpenter Signed-off-by: Richard Purdie --- diff --git a/drivers/video/backlight/88pm860x_bl.c b/drivers/video/backlight/88pm860x_bl.c index 68d2518fadaa..78d8fde9fe8f 100644 --- a/drivers/video/backlight/88pm860x_bl.c +++ b/drivers/video/backlight/88pm860x_bl.c @@ -222,6 +222,7 @@ static int pm860x_backlight_probe(struct platform_device *pdev) data->port = __check_device(pdata, name); if (data->port < 0) { dev_err(&pdev->dev, "wrong platform data is assigned"); + kfree(data); return -EINVAL; }