Skip to content

Commit

Permalink
r8169: add missing conditional compiling for call to r8169_remove_leds
Browse files Browse the repository at this point in the history
commit 97e176f upstream.

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

Fixes: 19fa4f2 ("r8169: fix LED-related deadlock on module removal")
Reported-by: Venkat Rao Bagalkote <venkat88@linux.vnet.ibm.com>
Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
Tested-By: Venkat Rao Bagalkote <venkat88@linux.vnet.ibm.com>
Link: https://lore.kernel.org/r/d080038c-eb6b-45ac-9237-b8c1cdd7870f@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
hkallweit authored and gregkh committed Apr 27, 2024
1 parent 53d986f commit da4fab4
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/net/ethernet/realtek/r8169_main.c
Expand Up @@ -4932,7 +4932,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);

Expand Down

0 comments on commit da4fab4

Please sign in to comment.