backlight: 88pm860x_bl: fix error handling in pm860x_backlight_probe
authorAxel Lin <axel.lin@gmail.com>
Mon, 10 May 2010 01:29:58 +0000 (09:29 +0800)
committerRichard Purdie <rpurdie@linux.intel.com>
Wed, 26 May 2010 16:34:37 +0000 (17:34 +0100)
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>
drivers/video/backlight/88pm860x_bl.c

index 78d8fde9fe8f2db3ca568e7924f5392af23c30e0..38ffc3fbcbe411a99f1d7214c664accf790af535 100644 (file)
@@ -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;
 }