diff mbox series

[net] net: dsa: realtek: don't parse compatible string for RTL8366S

Message ID 20220412155749.1835519-1-alvin@pqrs.dk (mailing list archive)
State Accepted
Commit 8e925de60ddaeccb455f0bdad17ce9d8cc2db2e1
Delegated to: Netdev Maintainers
Headers show
Series [net] net: dsa: realtek: don't parse compatible string for RTL8366S | expand

Checks

Context Check Description
netdev/tree_selection success Clearly marked for net
netdev/fixes_present fail Series targets non-next tree, but doesn't contain any Fixes tags
netdev/subject_prefix success Link
netdev/cover_letter success Single patches do not need cover letters
netdev/patch_count success Link
netdev/header_inline success No static functions without inline keyword in header files
netdev/build_32bit success Errors and warnings before: 0 this patch: 0
netdev/cc_maintainers success CCed 10 of 10 maintainers
netdev/build_clang success Errors and warnings before: 0 this patch: 0
netdev/module_param success Was 0 now: 0
netdev/verify_signedoff success Signed-off-by tag matches author and committer
netdev/verify_fixes success No Fixes tag
netdev/build_allmodconfig_warn success Errors and warnings before: 0 this patch: 0
netdev/checkpatch success total: 0 errors, 0 warnings, 0 checks, 11 lines checked
netdev/kdoc success Errors and warnings before: 0 this patch: 0
netdev/source_inline success Was 0 now: 0

Commit Message

Alvin Šipraga April 12, 2022, 3:57 p.m. UTC
From: Alvin Šipraga <alsi@bang-olufsen.dk>

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>
---
 drivers/net/dsa/realtek/realtek-smi.c | 5 -----
 1 file changed, 5 deletions(-)

Comments

Andrew Lunn April 12, 2022, 5:39 p.m. UTC | #1
On Tue, Apr 12, 2022 at 05:57:49PM +0200, Alvin Šipraga wrote:
> From: Alvin Šipraga <alsi@bang-olufsen.dk>
> 
> 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>

    Andrew
patchwork-bot+netdevbpf@kernel.org April 13, 2022, 1:50 p.m. UTC | #2
Hello:

This patch was applied to netdev/net.git (master)
by David S. Miller <davem@davemloft.net>:

On Tue, 12 Apr 2022 17:57:49 +0200 you wrote:
> From: Alvin Šipraga <alsi@bang-olufsen.dk>
> 
> 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.
> 
> [...]

Here is the summary with links:
  - [net] net: dsa: realtek: don't parse compatible string for RTL8366S
    https://git.kernel.org/netdev/net/c/8e925de60dda

You are awesome, thank you!
diff mbox series

Patch

diff --git a/drivers/net/dsa/realtek/realtek-smi.c b/drivers/net/dsa/realtek/realtek-smi.c
index 2243d3da55b2..6cec559c90ce 100644
--- a/drivers/net/dsa/realtek/realtek-smi.c
+++ b/drivers/net/dsa/realtek/realtek-smi.c
@@ -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",