Michał Mirosław
207dffe6bc
Bluetooth: hci_bcm: fix freeing not-requested IRQ
commit 81bd5d0c62 upstream.
When BT module can't be initialized, but it has an IRQ, unloading
the driver WARNs when trying to free not-yet-requested IRQ. Fix it by
noting whether the IRQ was requested.
WARNING: CPU: 2 PID: 214 at kernel/irq/devres.c:144 devm_free_irq+0x49/0x4ca
[...]
WARNING: CPU: 2 PID: 214 at kernel/irq/manage.c:1746 __free_irq+0x8b/0x27c
Trying to free already-free IRQ 264
Modules linked in: hci_uart(-) btbcm bluetooth ecdh_generic ecc libaes
CPU: 2 PID: 214 Comm: rmmod Tainted: G W 5.6.1mq-00044-ga5f9ea098318-dirty #928
[...]
[<b016aefb>] (devm_free_irq) from [<af8ba1ff>] (bcm_close+0x97/0x118 [hci_uart])
[<af8ba1ff>] (bcm_close [hci_uart]) from [<af8b736f>] (hci_uart_unregister_device+0x33/0x3c [hci_uart])
[<af8b736f>] (hci_uart_unregister_device [hci_uart]) from [<b035930b>] (serdev_drv_remove+0x13/0x20)
[<b035930b>] (serdev_drv_remove) from [<b037093b>] (device_release_driver_internal+0x97/0x118)
[<b037093b>] (device_release_driver_internal) from [<b0370a0b>] (driver_detach+0x2f/0x58)
[<b0370a0b>] (driver_detach) from [<b036f855>] (bus_remove_driver+0x41/0x94)
[<b036f855>] (bus_remove_driver) from [<af8ba8db>] (bcm_deinit+0x1b/0x740 [hci_uart])
[<af8ba8db>] (bcm_deinit [hci_uart]) from [<af8ba86f>] (hci_uart_exit+0x13/0x30 [hci_uart])
[<af8ba86f>] (hci_uart_exit [hci_uart]) from [<b01900bd>] (sys_delete_module+0x109/0x1d0)
[<b01900bd>] (sys_delete_module) from [<b0101001>] (ret_fast_syscall+0x1/0x5a)
[...]
Cc: stable@vger.kernel.org
Fixes: 6cc4396c88 ("Bluetooth: hci_bcm: Add wake-up capability")
Signed-off-by: Michał Mirosław <mirq-linux@rere.qmqm.pl>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-06-22 09:05:26 +02:00
..
2020-06-22 09:05:09 +02:00
2020-05-02 17:25:48 +02:00
2020-04-17 10:48:52 +02:00
2020-06-10 21:35:01 +02:00
2020-06-07 13:17:56 +02:00
2020-06-22 09:05:26 +02:00
2020-04-17 10:48:37 +02:00
2020-06-22 09:05:23 +02:00
2020-06-22 09:05:03 +02:00
2020-06-22 09:05:11 +02:00
2020-05-20 08:18:40 +02:00
2020-06-22 09:05:20 +02:00
2020-06-22 09:05:18 +02:00
2020-06-22 09:05:23 +02:00
2020-04-13 10:45:03 +02:00
2020-06-22 09:05:10 +02:00
2020-06-22 09:05:23 +02:00
2020-06-22 09:05:09 +02:00
2020-06-07 13:17:53 +02:00
2020-04-23 10:30:17 +02:00
2020-06-22 09:05:23 +02:00
2020-06-22 09:05:23 +02:00
2020-06-10 21:35:00 +02:00
2020-06-22 09:05:00 +02:00
2020-06-22 09:05:00 +02:00
2020-06-03 08:19:41 +02:00
2020-05-27 17:37:43 +02:00
2020-04-23 10:30:13 +02:00
2020-06-22 09:05:23 +02:00
2020-06-22 09:05:19 +02:00
2020-06-22 09:05:26 +02:00
2020-05-10 10:30:11 +02:00
2020-06-22 09:05:24 +02:00
2020-06-22 09:05:20 +02:00
2020-05-27 17:37:30 +02:00
2020-06-22 09:05:26 +02:00
2020-06-10 21:34:59 +02:00
2020-06-07 13:17:53 +02:00
2020-06-22 09:05:16 +02:00
2020-06-10 21:35:00 +02:00
2020-04-23 10:30:14 +02:00
2020-06-22 09:05:26 +02:00
2020-06-22 09:05:14 +02:00
2020-05-20 08:18:41 +02:00
2020-06-22 09:05:20 +02:00
2020-04-23 10:30:22 +02:00
2020-04-29 16:31:14 +02:00
2020-05-27 17:37:43 +02:00
2020-05-02 17:25:47 +02:00
2020-04-13 10:45:16 +02:00
2020-04-23 10:30:18 +02:00
2020-04-29 16:31:13 +02:00
2020-06-22 09:05:07 +02:00
2020-04-23 10:30:17 +02:00
2020-06-22 09:05:23 +02:00
2020-06-22 09:05:19 +02:00
2020-05-06 08:13:31 +02:00
2020-05-27 17:37:40 +02:00
2020-06-22 09:05:25 +02:00
2020-06-22 09:05:23 +02:00
2020-05-06 08:13:31 +02:00
2020-05-27 17:37:32 +02:00
2020-06-22 09:05:06 +02:00
2020-04-29 16:31:09 +02:00
2020-06-22 09:05:09 +02:00