Commit 1f976996 authored by Axel Lin's avatar Axel Lin Committed by Richard Purdie

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: default avatarAxel Lin <axel.lin@gmail.com>
Signed-off-by: default avatarRichard Purdie <rpurdie@linux.intel.com>
parent 146e10a8
...@@ -267,6 +267,7 @@ static int pm860x_backlight_probe(struct platform_device *pdev) ...@@ -267,6 +267,7 @@ static int pm860x_backlight_probe(struct platform_device *pdev)
backlight_update_status(bl); backlight_update_status(bl);
return 0; return 0;
out: out:
backlight_device_unregister(bl);
kfree(data); kfree(data);
return ret; return ret;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment