Commit 023a883
backlight: backlight: Slighly simplify devm_of_find_backlight()
Use devm_add_action_or_reset() instead of devm_add_action()+hand writing
what is done in the release function, should an error occur.
This is more straightforward and saves a few lines of code.
While at it, remove a useless test in devm_backlight_release(). 'data' is
known to be not NULL when this function is called.
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Reviewed-by: Daniel Thompson <daniel.thompson@linaro.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Link: https://lore.kernel.org/r/f998a4291d865273afa0d1f85764a9ac7fbc1b64.1644738084.git.christophe.jaillet@wanadoo.fr1 parent d4294e4 commit 023a883
1 file changed
Lines changed: 4 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
710 | 710 | | |
711 | 711 | | |
712 | 712 | | |
713 | | - | |
714 | | - | |
| 713 | + | |
715 | 714 | | |
716 | 715 | | |
717 | 716 | | |
| |||
737 | 736 | | |
738 | 737 | | |
739 | 738 | | |
740 | | - | |
741 | | - | |
742 | | - | |
| 739 | + | |
| 740 | + | |
743 | 741 | | |
744 | | - | |
| 742 | + | |
745 | 743 | | |
746 | 744 | | |
747 | 745 | | |
| |||
0 commit comments