]> git.baikalelectronics.ru Git - kernel.git/commitdiff
net: dsa: realtek: don't parse compatible string for RTL8366S
authorAlvin Šipraga <alsi@bang-olufsen.dk>
Tue, 12 Apr 2022 15:57:49 +0000 (17:57 +0200)
committerDavid S. Miller <davem@davemloft.net>
Wed, 13 Apr 2022 13:40:59 +0000 (14:40 +0100)
This switch is not even supported, but if someone were to actually put
this compatible string "realtek,rtl8366s" in their device tree, they
would be greeted with a kernel panic because the probe function would
dereference NULL. So let's just remove it.

Link: https://lore.kernel.org/all/CACRpkdYdKZs0WExXc3=0yPNOwP+oOV60HRz7SRoGjZvYHaT=1g@mail.gmail.com/
Signed-off-by: Alvin Šipraga <alsi@bang-olufsen.dk>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/dsa/realtek/realtek-smi.c

index 2243d3da55b29c002443f38e2f38b8111a3cb74e..6cec559c90ceb961cac0a86b7564aba9c6641aac 100644 (file)
@@ -546,11 +546,6 @@ static const struct of_device_id realtek_smi_of_match[] = {
                .data = &rtl8366rb_variant,
        },
 #endif
-       {
-               /* FIXME: add support for RTL8366S and more */
-               .compatible = "realtek,rtl8366s",
-               .data = NULL,
-       },
 #if IS_ENABLED(CONFIG_NET_DSA_REALTEK_RTL8365MB)
        {
                .compatible = "realtek,rtl8365mb",