diff options
author | Axel Lin <axel.lin@gmail.com> | 2010-05-09 21:29:58 -0400 |
---|---|---|
committer | Richard Purdie <rpurdie@linux.intel.com> | 2010-05-26 12:34:37 -0400 |
commit | 1f976996c7413b5b48d35b195cc2d7adcd3f68d7 (patch) | |
tree | 29997ce9c5b1f61b8112eccb8ce85dd784f350c8 /drivers/video/backlight/88pm860x_bl.c | |
parent | 146e10a8c457236e017355ed9ba0ef78fbb3d12b (diff) |
backlight: 88pm860x_bl: fix error handling in pm860x_backlight_probe
This patch properly unregisters a previously registered backlight device object
in error handling
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
Diffstat (limited to 'drivers/video/backlight/88pm860x_bl.c')
-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 78d8fde9fe8f..38ffc3fbcbe4 100644 --- a/drivers/video/backlight/88pm860x_bl.c +++ b/drivers/video/backlight/88pm860x_bl.c | |||
@@ -267,6 +267,7 @@ static int pm860x_backlight_probe(struct platform_device *pdev) | |||
267 | backlight_update_status(bl); | 267 | backlight_update_status(bl); |
268 | return 0; | 268 | return 0; |
269 | out: | 269 | out: |
270 | backlight_device_unregister(bl); | ||
270 | kfree(data); | 271 | kfree(data); |
271 | return ret; | 272 | return ret; |
272 | } | 273 | } |