Thadeu Lima de Souza Cascardo 5aae769a0e ipmi: fix initialization when workqueue allocation fails
commit 75d70d76cb7b927cace2cb34265d68ebb3306b13 upstream.

If the workqueue allocation fails, the driver is marked as not initialized,
and timer and panic_notifier will be left registered.

Instead of removing those when workqueue allocation fails, do the workqueue
initialization before doing it, and cleanup srcu_struct if it fails.

Fixes: 1d49eb91e86e ("ipmi: Move remove_work to dedicated workqueue")
Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@canonical.com>
Cc: Corey Minyard <cminyard@mvista.com>
Cc: Ioanna Alifieraki <ioanna-maria.alifieraki@canonical.com>
Cc: stable@vger.kernel.org
Message-Id: <20211217154410.1228673-2-cascardo@canonical.com>
Signed-off-by: Corey Minyard <cminyard@mvista.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-12-29 12:28:53 +01:00
..
2021-09-01 09:51:16 -07:00
2021-11-18 19:16:41 +01:00
2021-04-05 08:43:50 +02:00
2021-05-21 10:09:30 +02:00
2021-06-04 15:35:03 +02:00
2021-06-04 15:35:03 +02:00
2021-07-27 12:17:21 +02:00