diff --git a/src/joystick/android/SDL_sysjoystick.c b/src/joystick/android/SDL_sysjoystick.c index 8656a5322..6ef16a93b 100644 --- a/src/joystick/android/SDL_sysjoystick.c +++ b/src/joystick/android/SDL_sysjoystick.c @@ -340,7 +340,6 @@ Android_RemoveJoystick(int device_id) return -1; } - const int retval = item->device_instance; if (item->joystick) { item->joystick->hwdata = NULL; } @@ -376,7 +375,7 @@ Android_RemoveJoystick(int device_id) SDL_free(item->name); SDL_free(item); - return retval; + return numjoysticks; }