If serdes type is invalid, we cannot assume that it is a valid index
for serdes_type_to_str[].

Fixes: edb470253346 ("arm: mvebu: Add Armada 38x SERDES / PHY init code from 
Marvell bin_hdr")
Signed-off-by: Heinrich Schuchardt <heinrich.schucha...@canonical.com>
---
 arch/arm/mach-mvebu/serdes/a38x/high_speed_env_spec.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/arm/mach-mvebu/serdes/a38x/high_speed_env_spec.c 
b/arch/arm/mach-mvebu/serdes/a38x/high_speed_env_spec.c
index 3349f4eb54..f69da7ec0c 100644
--- a/arch/arm/mach-mvebu/serdes/a38x/high_speed_env_spec.c
+++ b/arch/arm/mach-mvebu/serdes/a38x/high_speed_env_spec.c
@@ -824,8 +824,8 @@ u32 hws_serdes_topology_verify(enum serdes_type 
serdes_type, u32 serdes_id,
        enum unit_id unit_id;
 
        if (serdes_type > RXAUI) {
-               printf("%s: Warning: Wrong serdes type %s serdes#%d\n",
-                      __func__, serdes_type_to_string[serdes_type], serdes_id);
+               printf("%s: Warning: Wrong serdes type %d serdes#%d\n",
+                      __func__, serdes_type, serdes_id);
                return MV_FAIL;
        }
 
-- 
2.39.2

Reply via email to