FAILED: patch "[PATCH] soc: samsung: exynos-chipid: Add NULL pointer check in" failed to apply to 5.10-stable tree
Subsystems (2)
[email protected]
maintainerThe patch below does not apply to the 5.10-stable tree.
If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to <[email protected]>.
To reproduce the conflict and resubmit, you may use the following commands:
git fetch https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/ linux-5.10.y
git checkout FETCH_HEAD
git cherry-pick -x c8222ef6cf29dd7cad21643228f96535cc02b327
# <resolve conflicts, build, test, etc.>
git commit -s
git send-email --to '<[email protected]>' --in-reply-to '2025041734-nebulizer-isolating-0ccb@gregkh' --subject-prefix 'PATCH 5.10.y' HEAD^..
Possible dependencies:
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
From c8222ef6cf29dd7cad21643228f96535cc02b327 Mon Sep 17 00:00:00 2001
From: Chenyuan Yang <[email protected]>
Date: Wed, 12 Feb 2025 15:35:18 -0600
Subject: [PATCH] soc: samsung: exynos-chipid: Add NULL pointer check in
exynos_chipid_probe()
soc_dev_attr->revision could be NULL, thus,
a pointer check is added to prevent potential NULL pointer dereference. This is similar to the fix in commit 3027e7b15b02
("ice: Fix some null pointer dereference issues in ice_ptp.c").
This issue is found by our static analysis tool.
drivers/soc/samsung/exynos-chipid.c +2 -0
@@ -134,6 +134,8 @@ static int exynos_chipid_probe(struct platform_device *pdev) soc_dev_attr->revision =devm_kasprintf (&pdev->dev,GFP_KERNEL ,"%x" , soc_info.revision); +if (!soc_dev_attr->revision) +return -ENOMEM ; soc_dev_attr->soc_id =product_id_to_soc_id (soc_info.product_id);if (!soc_dev_attr->soc_id) {pr_err ("Unknown SoC\n" );