projects
/
contrib
/
mraa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7ad78d0
)
pwm.c: Fix error in mraa_pwm_read_duty
author
Brendan Le Foll
<brendan.le.foll@intel.com>
Tue, 2 Dec 2014 10:50:17 +0000
(10:50 +0000)
committer
Brendan Le Foll
<brendan.le.foll@intel.com>
Tue, 2 Dec 2014 10:50:17 +0000
(10:50 +0000)
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
src/pwm/pwm.c
patch
|
blob
|
history
diff --git
a/src/pwm/pwm.c
b/src/pwm/pwm.c
index
248d9b9
..
22f62e3
100644
(file)
--- a/
src/pwm/pwm.c
+++ b/
src/pwm/pwm.c
@@
-136,7
+136,7
@@
mraa_pwm_read_duty(mraa_pwm_context dev)
lseek(dev->duty_fp, 0, SEEK_SET);
char output[MAX_SIZE];
ssize_t rb = read(dev->duty_fp, output, size+1);
- if (rb
>
0) {
+ if (rb
<
0) {
syslog(LOG_ERR, "pwm: Error in reading duty");
return -1;
}