0412c919035f4b96ed06cd5fe5273f4008ad3a8a
[openwrt/staging/svanheule.git] /
1 From 97e176fcbbf3c0f2bd410c9b241177c051f57176 Mon Sep 17 00:00:00 2001
2 From: Heiner Kallweit <hkallweit1@gmail.com>
3 Date: Wed, 10 Apr 2024 15:11:28 +0200
4 Subject: [PATCH] r8169: add missing conditional compiling for call to
5 r8169_remove_leds
6
7 Add missing dependency on CONFIG_R8169_LEDS. As-is a link error occurs
8 if config option CONFIG_R8169_LEDS isn't enabled.
9
10 Fixes: 19fa4f2a85d7 ("r8169: fix LED-related deadlock on module removal")
11 Reported-by: Venkat Rao Bagalkote <venkat88@linux.vnet.ibm.com>
12 Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
13 Tested-By: Venkat Rao Bagalkote <venkat88@linux.vnet.ibm.com>
14 Link: https://lore.kernel.org/r/d080038c-eb6b-45ac-9237-b8c1cdd7870f@gmail.com
15 Signed-off-by: Jakub Kicinski <kuba@kernel.org>
16 ---
17 drivers/net/ethernet/realtek/r8169_main.c | 3 ++-
18 1 file changed, 2 insertions(+), 1 deletion(-)
19
20 --- a/drivers/net/ethernet/realtek/r8169_main.c
21 +++ b/drivers/net/ethernet/realtek/r8169_main.c
22 @@ -5071,7 +5071,8 @@ static void rtl_remove_one(struct pci_de
23
24 cancel_work_sync(&tp->wk.work);
25
26 - r8169_remove_leds(tp->leds);
27 + if (IS_ENABLED(CONFIG_R8169_LEDS))
28 + r8169_remove_leds(tp->leds);
29
30 unregister_netdev(tp->dev);
31