Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 146e10a8 authored by Axel Lin's avatar Axel Lin Committed by Richard Purdie
Browse files

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: default avatarAxel Lin <axel.lin@gmail.com>
Signed-off-by: default avatarRichard Purdie <rpurdie@linux.intel.com>
parent beb0a43f
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -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;
}