diff --git a/dlls/dinput/joystick_linuxinput.c b/dlls/dinput/joystick_linuxinput.c
index c88ac78c4d8..0956e7c685d 100644
--- a/dlls/dinput/joystick_linuxinput.c
+++ b/dlls/dinput/joystick_linuxinput.c
@@ -333,7 +333,7 @@ static BOOL joydev_enum_deviceW(DWORD dwDevType, DWORD dwFlags, LPDIDEVICEINSTAN
   find_joydevs();
 
   if (id >= have_joydevs) {
-    return -1;
+    return FALSE;
   }
 
   if (!((dwDevType == 0) ||