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 7B3E329992B; Sat, 12 Sep 2026 16:08:40 +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=1789229321; cv=none; b=tsKV7Icw9i1HTDrxPkkYJNn2K3s/dLMYyGUuEauqvXaADnLBBmk4rpgtnf1XCscmrzy6iWQdv7ey359Dr883HCOxyIerBz1zrNRw0WyFvPP8jR5nngRoZW5N716lJFWbl8TGuwMoVDzaTNtrJ1+Kb3MFSgM8zXqSQqwGzWrbKI0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1789229321; c=relaxed/simple; bh=ltax1ZFU+tV9i7eqH2O6WL0brLBjWLHpsUFJZGDRjhY=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=hM/o6pyPy40rfBptwTGYQbxytIt7WsE6FWNqmSjPFMQREIVjcchCM2S/AWpwRwPhZWQI33vrHLgeAXUs5V3gRx5w7FIDvUAh6Cpaac7NzQ8fCnq5RWs92wbgYe8JEwLY2+EIm0KL1EDqBMhn5/o4d1ort9pFprsqb0LLTfNKTtE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=nSKAAMaQ; 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="nSKAAMaQ" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 173C21F000FF; Sat, 12 Sep 2026 16:08:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1789229320; bh=vYEjAmtEyp4e6jMH/hQWLdG8a+watw3Mz7Tm1Y2Qeig=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=nSKAAMaQXd3YFKFVnnNHe6lzcrV/i+t1Fj1bY8+PyOU7WcsPEA49LetYFnBTI82Eu JMAN12BjGcKvq9ZOzcXzrzTwu6rs3DPQbzc7Wrs4ofQ8/8yUbEWJuEFlkxHBl9077l e8/XKBmBeDG+wZOg06Uk0GqyDMXIwDhQuH/DIQCY= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Vladimir Zapolskiy , Dmitry Baryshkov , Konrad Dybcio , Joerg Roedel , Sasha Levin Subject: [PATCH 6.1 0567/1191] iommu/msm: Return -ENOMEM on memory allocation failure in probe Date: Sat, 12 Sep 2026 08:54:55 +0200 Message-ID: <20260912065600.982551961@linuxfoundation.org> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20260912065548.086904252@linuxfoundation.org> References: <20260912065548.086904252@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.1-stable review patch. If anyone has any objections, please let me know. ------------------ From: Vladimir Zapolskiy [ Upstream commit b0d50c9016c4c2959dfa61bf9549cf98f9aa19cd ] 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: 109bd48ea2e1 ("iommu/msm: Add DT adaptation") Signed-off-by: Vladimir Zapolskiy Reviewed-by: Dmitry Baryshkov Reviewed-by: Konrad Dybcio Signed-off-by: Joerg Roedel Signed-off-by: Sasha Levin --- drivers/iommu/msm_iommu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/iommu/msm_iommu.c b/drivers/iommu/msm_iommu.c index 16179a9a72830..256ac3617d701 100644 --- a/drivers/iommu/msm_iommu.c +++ b/drivers/iommu/msm_iommu.c @@ -703,7 +703,7 @@ static int msm_iommu_probe(struct platform_device *pdev) iommu = devm_kzalloc(&pdev->dev, sizeof(*iommu), GFP_KERNEL); if (!iommu) - return -ENODEV; + return -ENOMEM; iommu->dev = &pdev->dev; INIT_LIST_HEAD(&iommu->ctx_list); -- 2.53.0