Skip to content
Snippets Groups Projects
Commit d1cd2142 authored by Jonathan Richardson's avatar Jonathan Richardson Committed by Thierry Reding
Browse files

pwm: Set enable state properly on failed call to enable


The pwm_enable() function didn't clear the enabled bit if a call to the
driver's ->enable() callback returned an error. The result was that the
state of the PWM core was wrong. Clearing the bit when enable returns
an error ensures the state is properly set.

Tested-by: default avatarJonathan Richardson <jonathar@broadcom.com>
Reviewed-by: default avatarDmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: default avatarJonathan Richardson <jonathar@broadcom.com>
[thierry.reding@gmail.com: add missing kerneldoc for the lock]
Signed-off-by: default avatarThierry Reding <thierry.reding@gmail.com>
parent f080be27
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment