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 C415F2BCF4C; Sat, 12 Sep 2026 18:38:06 +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=1789238287; cv=none; b=st/3DwGBGcev+z34Avei+E3jmiPKcP4vE4VBfsc2eYezyCTnYVRNZ+sEsu9+vLg21dyME6nmAgtukkKV/t4cggNl6G35dLlzFv4XbregAxQGvsr3J17wZciC3fnGgksJy/oiKj+kAnlcNKZsfMnhZUIdyd/LMeZ8buUrwYXnC30= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1789238287; c=relaxed/simple; bh=yT1Bk5D1NMAfd30rxQyrGZHNIZtwunmcwkygBXhtReE=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=b5LPHnC8J3pak30ME2JUJNlwiIw5KCM40a7mVxa8ec5pX0Knz3gwrTDExP4qQRbuV00Me8+fwU0KEV6iebCOanuVupKxQ3dV/JkRcKDZ0QfsA9EeEnrnYZp0g1SA1YOZ8QeI81WgtO0Q2yALLlnZ+THJ1+trHh5hA2VdGxelLWE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=od2c7VBb; 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="od2c7VBb" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 7E2271F000FF; Sat, 12 Sep 2026 18:38:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1789238286; bh=xumY/86XdasJv/XMpaFBK+aepdKXEg811OVLdS6zGJ4=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=od2c7VBbErbrv45Yr/hEcnv/wRpN0a5wngLAlxRsWRxwjoJr3fxySiBJkPFtbAy2k 7JmjCVx8D1YT/ls6bXaunAcExQQrh3aZRCceoDUvgXTZelDRDmU43JOE8WdoYRhWGq LBmVUGzKXkgHE9qj/qCJ90t/R518dz6iwq7ZXpgs= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Vladimir Zapolskiy , Frank Li , Vinod Koul , Sasha Levin Subject: [PATCH 5.15 430/935] dmaengine: hisilicon: Return -ENOMEM on dynamic memory allocation in probe Date: Sat, 12 Sep 2026 08:57:40 +0200 Message-ID: <20260912065536.691614457@linuxfoundation.org> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20260912065526.833703348@linuxfoundation.org> References: <20260912065526.833703348@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.15-stable review patch. If anyone has any objections, please let me know. ------------------ From: Vladimir Zapolskiy [ Upstream commit cbabdd6ce1b313b5877c7fbb2f5e2f7936564d2f ] Out of memory situation on driver's probe is expected to be reported to the driver's framework with a proper -ENOMEM error code. Fixes: e9f08b65250d ("dmaengine: hisilicon: Add Kunpeng DMA engine support") Signed-off-by: Vladimir Zapolskiy Reviewed-by: Frank Li Link: https://patch.msgid.link/20260630144214.4080302-1-vz@kernel.org Signed-off-by: Vinod Koul Signed-off-by: Sasha Levin --- drivers/dma/hisi_dma.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/dma/hisi_dma.c b/drivers/dma/hisi_dma.c index df6be7ca340cd..c042fd4a85ca2 100644 --- a/drivers/dma/hisi_dma.c +++ b/drivers/dma/hisi_dma.c @@ -529,7 +529,7 @@ static int hisi_dma_probe(struct pci_dev *pdev, const struct pci_device_id *id) hdma_dev = devm_kzalloc(dev, struct_size(hdma_dev, chan, HISI_DMA_CHAN_NUM), GFP_KERNEL); if (!hdma_dev) - return -EINVAL; + return -ENOMEM; hdma_dev->base = pcim_iomap_table(pdev)[PCI_BAR_2]; hdma_dev->pdev = pdev; -- 2.53.0