diff --git a/testing/drivertest/drivertest_touchpanel.c b/testing/drivertest/drivertest_touchpanel.c index c84369b0f..89455b96f 100644 --- a/testing/drivertest/drivertest_touchpanel.c +++ b/testing/drivertest/drivertest_touchpanel.c @@ -642,9 +642,10 @@ void touchpad_deinit(touchpad_s *touchpad) touchpad->indev = NULL; } - if (touchpad->fd > 0) + if (touchpad->fd >= 0) { close(touchpad->fd); + touchpad->fd = -1; } free(touchpad);