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 19D5637E5CF; Sat, 12 Sep 2026 12:05:34 +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=1789214736; cv=none; b=Xy0/v21WWk0/Hr3TN3z8/6w84/+sEIIncB3bcoACnGqhp37f9jK3fHfoZtV8ft01i5gbslVfHvcS9du4psUGXE79fbKvOZ8rHeU5U5cc7V4GULbQ33DSt12V2icgXB9Q1cQMOE3jmUCL63UaNWJrpS5S7AbHSP2IECk+bSppyoQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1789214736; c=relaxed/simple; bh=fBRpbVhLKVkI8z+b9fTlTTCeFf+xmwStbOlkRDAeacM=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=PsUidHZ9m66Mzqpordnt3Heob8kjfKR9J8yNhEENQ2Gfvx3Hla6Dq9mq1pFN/2RgOLXp+9RHf1069rlc2I7M5Y8sd7dGvQHGZOEwxvaiZnc816wsC9FazYu0DnE87VAL/aXcTanu+qCzUADDQjE55zbcO6PnduLH59avNu9LyS4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=wjnc3/ze; 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="wjnc3/ze" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 8F5A01F000FF; Sat, 12 Sep 2026 12:05:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1789214734; bh=IeGducIyaQ8Mw5n4xt8oKKpLGfaBMEUPvroqurKuRag=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=wjnc3/zehMMzlazbFabbJl3CjdFiQi5toJYSw1SB6ECQBO0O6z3hfA9r39xlbwCZv YaEXyH+k2ABbrUrLWiP/+5s5oSIWZ0swdsj6dm/YXWFJJndB8qGRQvd6F/4+ix0T1u mcEGY4kyt6WRIxf5g3Ah6+2DOXj00BagGddPoDgo= 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 6.12 0388/1376] dmaengine: hisilicon: Return -ENOMEM on dynamic memory allocation in probe Date: Sat, 12 Sep 2026 08:46:54 +0200 Message-ID: <20260912065616.194576758@linuxfoundation.org> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20260912065607.535295758@linuxfoundation.org> References: <20260912065607.535295758@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 6.12-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 25a4134be36b7..ede094e0d0905 100644 --- a/drivers/dma/hisi_dma.c +++ b/drivers/dma/hisi_dma.c @@ -983,7 +983,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, 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