From: Axel Lin Date: Mon, 10 May 2010 01:27:34 +0000 (+0800) Subject: backlight: max8925_bl: Fix error handling path X-Git-Tag: MMI-PSA29.97-13-9~23431^2~4 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=146e10a8c457236e017355ed9ba0ef78fbb3d12b;p=GitHub%2FMotorolaMobilityLLC%2Fkernel-slsi.git 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 --- diff --git a/drivers/video/backlight/max8925_bl.c b/drivers/video/backlight/max8925_bl.c index b5accc957ad3..b2b2c7ba1f63 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; }