From 146e10a8c457236e017355ed9ba0ef78fbb3d12b Mon Sep 17 00:00:00 2001 From: Axel Lin Date: Mon, 10 May 2010 09:27:34 +0800 Subject: backlight: max8925_bl: Fix error handling path Properly unregister a previously registered backlight device object in error handling of max8925_backlight_probe. Signed-off-by: Axel Lin Signed-off-by: Richard Purdie --- drivers/video/backlight/max8925_bl.c | 1 + 1 file changed, 1 insertion(+) (limited to 'drivers/video/backlight') diff --git a/drivers/video/backlight/max8925_bl.c b/drivers/video/backlight/max8925_bl.c index b5accc957ad..b2b2c7ba1f6 100644 --- a/drivers/video/backlight/max8925_bl.c +++ b/drivers/video/backlight/max8925_bl.c @@ -162,6 +162,7 @@ static int __devinit max8925_backlight_probe(struct platform_device *pdev) backlight_update_status(bl); return 0; out: + backlight_device_unregister(bl); kfree(data); return ret; } -- cgit v1.2.3-70-g09d2