types: Remove detail and progress from struct status
[petitboot] / ui / common / joystick.c
index 455ff19b9d759c2f536b0d8c73ff873f3622e19d..a3d6abd6acc37803809c75f6cbd887336bf54c0f 100644 (file)
@@ -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;
 }