780-17-v6.9-r8169-add-missing-conditional-compiling-for-call-to-.patch 1.2 KB

12345678910111213141516171819202122232425262728293031
  1. From 97e176fcbbf3c0f2bd410c9b241177c051f57176 Mon Sep 17 00:00:00 2001
  2. From: Heiner Kallweit <[email protected]>
  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. Add missing dependency on CONFIG_R8169_LEDS. As-is a link error occurs
  7. if config option CONFIG_R8169_LEDS isn't enabled.
  8. Fixes: 19fa4f2a85d7 ("r8169: fix LED-related deadlock on module removal")
  9. Reported-by: Venkat Rao Bagalkote <[email protected]>
  10. Signed-off-by: Heiner Kallweit <[email protected]>
  11. Tested-By: Venkat Rao Bagalkote <[email protected]>
  12. Link: https://lore.kernel.org/r/[email protected]
  13. Signed-off-by: Jakub Kicinski <[email protected]>
  14. ---
  15. drivers/net/ethernet/realtek/r8169_main.c | 3 ++-
  16. 1 file changed, 2 insertions(+), 1 deletion(-)
  17. --- a/drivers/net/ethernet/realtek/r8169_main.c
  18. +++ b/drivers/net/ethernet/realtek/r8169_main.c
  19. @@ -5071,7 +5071,8 @@ static void rtl_remove_one(struct pci_de
  20. cancel_work_sync(&tp->wk.work);
  21. - r8169_remove_leds(tp->leds);
  22. + if (IS_ENABLED(CONFIG_R8169_LEDS))
  23. + r8169_remove_leds(tp->leds);
  24. unregister_netdev(tp->dev);