Skip to content

Commit

Permalink
backlight: max8925_bl: Fix error handling path
Browse files Browse the repository at this point in the history
Properly unregister a previously registered backlight device object in error
handling of max8925_backlight_probe.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
  • Loading branch information
Axel Lin authored and Richard Purdie committed May 26, 2010
1 parent beb0a43 commit 146e10a
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/video/backlight/max8925_bl.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 146e10a

Please sign in to comment.