mirror of
https://github.com/torvalds/linux.git
synced 2026-09-22 12:44:03 +02:00
dmaengine: mediatek: mtk-uart-apdma: Return -ENOMEM on memory allocation failure
If dynamic memory allocation in driver's probe function execution fails, it
should be reported to the driver's framework with -ENOMEM error code.
Fixes: 9135408c3a ("dmaengine: mediatek: Add MediaTek UART APDMA support")
Signed-off-by: Vladimir Zapolskiy <vz@kernel.org>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Reviewed-by: Frank Li <Frank.Li@nxp.com>
Reviewed-by: Matthias Brugger <matthias.bgg@gmail.com>
Link: https://patch.msgid.link/20260701200703.117929-1-vz@kernel.org
Signed-off-by: Vinod Koul <vkoul@kernel.org>
This commit is contained in:
parent
fa9cb11584
commit
467265c750
|
|
@ -531,7 +531,7 @@ static int mtk_uart_apdma_probe(struct platform_device *pdev)
|
|||
for (i = 0; i < mtkd->dma_requests; i++) {
|
||||
c = devm_kzalloc(mtkd->ddev.dev, sizeof(*c), GFP_KERNEL);
|
||||
if (!c) {
|
||||
rc = -ENODEV;
|
||||
rc = -ENOMEM;
|
||||
goto err_no_dma;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user