diff options
| author | Trond Myklebust <trond.myklebust@primarydata.com> | 2016-07-24 12:51:10 -0400 |
|---|---|---|
| committer | Trond Myklebust <trond.myklebust@primarydata.com> | 2016-07-24 12:51:10 -0400 |
| commit | dc05973b288a5226bb7e56afd6c2fa07560a907c (patch) | |
| tree | 2e1eade8b6010ff4c844341fdeec9ee966d75ac7 /include/linux/pwm.h | |
| parent | 297fae4d0bee5d683533f3324baf1b363e7b48bf (diff) | |
| parent | e7bdea7750eb2a64aea4a08fa5c0a31719c8155d (diff) | |
Merge commit 'e7bdea7750eb'
Needed in order to work on top of pNFS changes in Linus' upstream kernel.
Diffstat (limited to 'include/linux/pwm.h')
| -rw-r--r-- | include/linux/pwm.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/include/linux/pwm.h b/include/linux/pwm.h index 17018f3c066e..908b67c847cd 100644 --- a/include/linux/pwm.h +++ b/include/linux/pwm.h @@ -235,6 +235,9 @@ static inline int pwm_config(struct pwm_device *pwm, int duty_ns, if (!pwm) return -EINVAL; + if (duty_ns < 0 || period_ns < 0) + return -EINVAL; + pwm_get_state(pwm, &state); if (state.duty_cycle == duty_ns && state.period == period_ns) return 0; |
