]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
soc: samsung: exynos-chipid: Add NULL pointer check in exynos_chipid_probe()
authorChenyuan Yang <chenyuan0y@gmail.com>
Wed, 12 Feb 2025 21:35:18 +0000 (15:35 -0600)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 25 Apr 2025 08:43:40 +0000 (10:43 +0200)
commit475b9b45dc32eba58ab794b5d47ac689fc018398
tree76849d115b3047b292f35fa42f88dca206410f30
parentd3071c1b7c1568ecc4deb6c576a85560fd1b7acf
soc: samsung: exynos-chipid: Add NULL pointer check in exynos_chipid_probe()

commit c8222ef6cf29dd7cad21643228f96535cc02b327 upstream.

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.

Signed-off-by: Chenyuan Yang <chenyuan0y@gmail.com>
Link: https://lore.kernel.org/r/20250212213518.69432-1-chenyuan0y@gmail.com
Fixes: 3253b7b7cd44 ("soc: samsung: Add exynos chipid driver support")
Cc: <stable@vger.kernel.org>
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/soc/samsung/exynos-chipid.c