android_kernel_xiaomi_sm7250/drivers/rapidio
Anirudh Rayabharam 4e2c772c90 rapidio: handle create_workqueue() failure
commit 69ce3ae36dcb03cdf416b0862a45369ddbf50fdf upstream.

In case create_workqueue() fails, release all resources and return -ENOMEM
to caller to avoid potential NULL pointer deref later. Move up the
create_workequeue() call to return early and avoid unwinding the call to
riocm_rx_fill().

Cc: Alexandre Bounine <alex.bou9@gmail.com>
Cc: Matt Porter <mporter@kernel.crashing.org>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Anirudh Rayabharam <mail@anirudhrb.com>
Link: https://lore.kernel.org/r/20210503115736.2104747-46-gregkh@linuxfoundation.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-05-26 11:48:33 +02:00
..
devices rapidio: fix the missed put_device() for rio_mport_add_riodev 2020-10-30 10:38:21 +01:00
switches rapidio: constify rio_device_id 2017-11-17 16:10:03 -08:00
Kconfig rapidio: Replace 'select' DMAENGINES 'with depends on' 2020-09-23 12:10:58 +02:00
Makefile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
rio_cm.c rapidio: handle create_workqueue() failure 2021-05-26 11:48:33 +02:00
rio-access.c rapidio: remove global irq spinlocks from the subsystem 2017-10-03 17:54:24 -07:00
rio-driver.c rapidio: add shutdown notification for RapidIO devices 2016-03-22 15:36:02 -07:00
rio-scan.c treewide: kzalloc() -> kcalloc() 2018-06-12 16:19:22 -07:00
rio-sysfs.c rapidio: use is_visible() to hide switch-specific attributes 2017-03-17 15:10:49 +09:00
rio.c rapidio: move 12 EXPORT_SYMBOL_GPL() calls to function implementations 2018-02-06 18:32:46 -08:00
rio.h rapidio: use is_visible() to hide switch-specific attributes 2017-03-17 15:10:49 +09:00