projects
/
petitboot
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
lib/process: Add raw stdout mode
[petitboot]
/
ui
/
common
/
joystick.c
diff --git
a/ui/common/joystick.c
b/ui/common/joystick.c
index 455ff19b9d759c2f536b0d8c73ff873f3622e19d..a3d6abd6acc37803809c75f6cbd887336bf54c0f 100644
(file)
--- a/
ui/common/joystick.c
+++ b/
ui/common/joystick.c
@@
-98,8
+98,8
@@
struct pjs *pjs_init(void *ctx, int (*map)(const struct js_event *))
return pjs;
out_err:
- close(pjs->fd);
-
pjs->fd = 0
;
+ if (pjs->fd >= 0)
+
close(pjs->fd)
;
talloc_free(pjs);
return NULL;
}