aboutsummaryrefslogtreecommitdiff
path: root/drivers/video/backlight/88pm860x_bl.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/video/backlight/88pm860x_bl.c')
-rw-r--r--drivers/video/backlight/88pm860x_bl.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/video/backlight/88pm860x_bl.c b/drivers/video/backlight/88pm860x_bl.c
index 68d2518fada..38ffc3fbcbe 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;
}
@@ -266,6 +267,7 @@ static int pm860x_backlight_probe(struct platform_device *pdev)
backlight_update_status(bl);
return 0;
out:
+ backlight_device_unregister(bl);
kfree(data);
return ret;
}