mirror of
https://github.com/fail0verflow/switch-linux.git
synced 2025-05-04 02:34:21 -04:00
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 <axel.lin@gmail.com> Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
This commit is contained in:
parent
146e10a8c4
commit
1f976996c7
1 changed files with 1 additions and 0 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue