Skip to contentSkip to conversation

r8169: add missing conditional compiling for call to r8169_remove_leds

PATCH Applied Heiner Kallweit 3 participants 3 messages Apr 10, 2024 – Apr 11, 2024

Subsystems (3)
lore
Share & tools
lore

Heiner Kallweit

author maintainer
#0 lore raw

PATCH 1/1 r8169: add missing conditional compiling for call to r8169_remove_leds

Add missing dependency on CONFIG_R8169_LEDS. As-is a link error occurs if config option CONFIG_R8169_LEDS isn't enabled.

Fixes 19fa4f2a85d7 ("r8169: fix LED-related deadlock on module removal")
---
 drivers/net/ethernet/realtek/r8169_main.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/net/ethernet/realtek/r8169_main.c +2 -1
index 06631a0d6..746ef4f34 100644
@@ -5046,7 +5046,8 @@ static void rtl_remove_one(struct pci_dev *pdev)
 
 	cancel_work_sync(&tp->wk.work);
 
-	r8169_remove_leds(tp->leds);
+	if (IS_ENABLED(CONFIG_R8169_LEDS))
+		r8169_remove_leds(tp->leds);
 
 	unregister_netdev(tp->dev);
 
Signature · 1 line
2.44.0
Tested-by on v1 1/1
#1 lore raw

Applied the patch and verified the reported issue.

Kernel compilation is successful on PowerPC with this patch.

Quoted 24 lines · Heiner Kallweit

Add missing dependency on CONFIG_R8169_LEDS. As-is a link error occurs if config option CONFIG_R8169_LEDS isn't enabled.

Fixes 19fa4f2a85d7 ("r8169: fix LED-related deadlock on module removal")
---
  drivers/net/ethernet/realtek/r8169_main.c | 3 ++-
  1 file changed, 2 insertions(+), 1 deletion(-)
drivers/net/ethernet/realtek/r8169_main.c +2 -1
index 06631a0d6..746ef4f34 100644
@@ -5046,7 +5046,8 @@ static void rtl_remove_one(struct pci_dev *pdev)
 
  	cancel_work_sync(&tp->wk.work);
 
-	r8169_remove_leds(tp->leds);
+	if (IS_ENABLED(CONFIG_R8169_LEDS))
+		r8169_remove_leds(tp->leds);
 
  	unregister_netdev(tp->dev);
 
#2 lore raw
In reply to Heiner Kallweit
This patch was applied to netdev/net.git (main) by Jakub Kicinski <[email protected]>:

Hello:

This patch was applied to netdev/net.git (main)
by Jakub Kicinski <[email protected]>:

Quoted 8 lines · On Wed, 10 Apr 2024 15:11:28 +0200 you wrote:

Add missing dependency on CONFIG_R8169_LEDS. As-is a link error occurs if config option CONFIG_R8169_LEDS isn't enabled.

Fixes 19fa4f2a85d7 ("r8169: fix LED-related deadlock on module removal")

[...]

Here is the summary with links:
- [net] r8169: add missing conditional compiling for call to r8169_remove_leds

    https://git.kernel.org/netdev/net/c/97e176fcbbf3

You are awesome, thank you!

Signature · 2 lines
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html