From: Axel Lin Date: Mon, 10 May 2010 01:29:58 +0000 (+0800) Subject: backlight: 88pm860x_bl: fix error handling in pm860x_backlight_probe X-Git-Tag: MMI-PSA29.97-13-9~23431^2~3 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=1f976996c7413b5b48d35b195cc2d7adcd3f68d7;p=GitHub%2FMotorolaMobilityLLC%2Fkernel-slsi.git 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 Signed-off-by: Richard Purdie --- 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) backlight_update_status(bl); return 0; out: + backlight_device_unregister(bl); kfree(data); return ret; }