diff options
author | Dan Carpenter <error27@gmail.com> | 2010-05-07 05:06:21 -0400 |
---|---|---|
committer | Richard Purdie <rpurdie@linux.intel.com> | 2010-05-26 08:08:31 -0400 |
commit | 9844ce0501b03843c44156d6e36afb80e847c974 (patch) | |
tree | 900423d004aee18bac803f422a15ec14e3107406 /drivers/video | |
parent | 8193db229101fa5e7e7070422a7471775140e7bd (diff) |
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 <error27@gmail.com>
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
Diffstat (limited to 'drivers/video')
-rw-r--r-- | drivers/video/backlight/88pm860x_bl.c | 1 |
1 files changed, 1 insertions, 0 deletions
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) | |||
222 | data->port = __check_device(pdata, name); | 222 | data->port = __check_device(pdata, name); |
223 | if (data->port < 0) { | 223 | if (data->port < 0) { |
224 | dev_err(&pdev->dev, "wrong platform data is assigned"); | 224 | dev_err(&pdev->dev, "wrong platform data is assigned"); |
225 | kfree(data); | ||
225 | return -EINVAL; | 226 | return -EINVAL; |
226 | } | 227 | } |
227 | 228 | ||