From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 6CF0E377ABA; Sat, 12 Sep 2026 19:45:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1789242306; cv=none; b=Yb3wVS/y1OhcZTN4klIHMzxmvAV2efLiLQUyuFsoQDkCRJSko9jxSI64NNMWHZ5EU6+ku3EdCKz/fGXhvdkZbb30TgkBzj+ZuXa4p+8WQBBRWtsxGwnQMZmYUpl4w6s/drVbgrMpEJxgGdwFFPcYN7zkwQ9t8D2TsB26i2FBcos= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1789242306; c=relaxed/simple; bh=9/8MHYn42XxEjvtnUH+NU4XlpN7DaBeWtTjp/An3xD0=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=HopzUF8yt7pfskuxzU+6TdnFYHiw9mBV5cNN9RQjdXjhSr6ReHbel8KfvLZYNjGbwlBdLS66Xt8lRwcXE7TCHzkzyNcqEdfN4xXTgo1+L/zi3jwzJ61Sgf4ej1Zh9EvVau9FZMzfjGsk/Ke4w8/ikueH9k+6k6EhmB22gm4tbRk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=vyb4Ony3; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="vyb4Ony3" Received: by smtp.kernel.org (Postfix) with ESMTPSA id CCFA41F000FF; Sat, 12 Sep 2026 19:45:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1789242305; bh=j9chNU33I7zdxbslmwHTJoM7WJdUB9uiT1dCRpx2vnI=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=vyb4Ony3IDf/mY71KrPl21qLMXrJoeOfx2mwdVZXSeRon9TKimUhbbjAE23madIo0 xh1qwuXl//n2U/o8dRWixcsuyiOkS8K+aq2wblL3zqKsw1jCe6ocHOZ4ZVWfB0bEpe lInCg5ZYTP5YUVsJBRi9FOez/YVcp/rSYm4EWlG0= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Vladimir Zapolskiy , AngeloGioacchino Del Regno , Frank Li , Matthias Brugger , Vinod Koul , Sasha Levin Subject: [PATCH 5.10 358/798] dmaengine: mediatek: mtk-uart-apdma: Return -ENOMEM on memory allocation failure Date: Sat, 12 Sep 2026 08:59:46 +0200 Message-ID: <20260912065525.366798792@linuxfoundation.org> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20260912065516.948645775@linuxfoundation.org> References: <20260912065516.948645775@linuxfoundation.org> User-Agent: quilt/0.69 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 5.10-stable review patch. If anyone has any objections, please let me know. ------------------ From: Vladimir Zapolskiy [ Upstream commit 467265c750edd7ab43803deeafe7d3120a791d32 ] 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: 9135408c3ace ("dmaengine: mediatek: Add MediaTek UART APDMA support") Signed-off-by: Vladimir Zapolskiy Reviewed-by: AngeloGioacchino Del Regno Reviewed-by: Frank Li Reviewed-by: Matthias Brugger Link: https://patch.msgid.link/20260701200703.117929-1-vz@kernel.org Signed-off-by: Vinod Koul Signed-off-by: Sasha Levin --- drivers/dma/mediatek/mtk-uart-apdma.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/dma/mediatek/mtk-uart-apdma.c b/drivers/dma/mediatek/mtk-uart-apdma.c index c1e132a110ffb..20d196b766835 100644 --- a/drivers/dma/mediatek/mtk-uart-apdma.c +++ b/drivers/dma/mediatek/mtk-uart-apdma.c @@ -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; } -- 2.53.0