SDL: joystick: Remove redundant CHECK_JOYSTICK_MAGIC in SDL_GetJoystickName

From 76defc5c82204707e1d11a53a561a789d3f1e769 Mon Sep 17 00:00:00 2001
From: Simon McVittie <[EMAIL REDACTED]>
Date: Sat, 9 Mar 2024 11:11:36 +0000
Subject: [PATCH] joystick: Remove redundant CHECK_JOYSTICK_MAGIC in
 SDL_GetJoystickName

Since commit 0dfdf1f3 "Fixed crash if joystick functions are passed a
NULL joystick", we've already done this check by the time we get to
this point.

Signed-off-by: Simon McVittie <smcv@collabora.com>
---
 src/joystick/SDL_joystick.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/src/joystick/SDL_joystick.c b/src/joystick/SDL_joystick.c
index cb95312f27038..f68968ff0b2ad 100644
--- a/src/joystick/SDL_joystick.c
+++ b/src/joystick/SDL_joystick.c
@@ -1547,8 +1547,6 @@ const char *SDL_GetJoystickName(SDL_Joystick *joystick)
         if (info) {
             retval = info->name;
         } else {
-            CHECK_JOYSTICK_MAGIC(joystick, NULL);
-
             retval = joystick->name;
         }
     }