Re: [PATCH] pci: endpoint: Add missing NULL check for alloc_workqueue()

From: Manivannan Sadhasivam

Date: Thu Dec 18 2025 - 02:15:04 EST



On Mon, 10 Nov 2025 12:04:46 +0800, Haotian Zhang wrote:
> The alloc_workqueue() function can return NULL on memory allocation
> failure. Without proper error checking, this leads to a NULL pointer
> dereference when queue_work() is later called with the NULL workqueue
> pointer in epf_ntb_epc_init().
>
> Add a NULL check immediately after alloc_workqueue() and return -ENOMEM
> on failure to prevent the driver from loading with an invalid workqueue
> pointer.
>
> [...]

Applied, thanks!

[1/1] pci: endpoint: Add missing NULL check for alloc_workqueue()
commit: 0a19a6d9ed65ef7df845c32befa994e45620c12d

Best regards,
--
Manivannan Sadhasivam <mani@xxxxxxxxxx>