This is a note to let you know that I've just added the patch titled soc: samsung: exynos-asv: handle reading revision register error to the 5.11-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: soc-samsung-exynos-asv-handle-reading-revision-register-error.patch and it can be found in the queue-5.11 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let <stable@xxxxxxxxxxxxxxx> know about it. >From 4561560dfb4f847a0b327d48bdd1f45bf1b6261f Mon Sep 17 00:00:00 2001 From: Krzysztof Kozlowski <krzk@xxxxxxxxxx> Date: Mon, 7 Dec 2020 20:05:15 +0100 Subject: soc: samsung: exynos-asv: handle reading revision register error From: Krzysztof Kozlowski <krzk@xxxxxxxxxx> commit 4561560dfb4f847a0b327d48bdd1f45bf1b6261f upstream. If regmap_read() fails, the product_id local variable will contain random value from the stack. Do not try to parse such value and fail the ASV driver probe. Fixes: 5ea428595cc5 ("soc: samsung: Add Exynos Adaptive Supply Voltage driver") Cc: <stable@xxxxxxxxxxxxxxx> Signed-off-by: Krzysztof Kozlowski <krzk@xxxxxxxxxx> Reviewed-by: Pankaj Dubey <pankaj.dubey@xxxxxxxxxxx> Link: https://lore.kernel.org/r/20201207190517.262051-3-krzk@xxxxxxxxxx Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> --- drivers/soc/samsung/exynos-asv.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) --- a/drivers/soc/samsung/exynos-asv.c +++ b/drivers/soc/samsung/exynos-asv.c @@ -129,7 +129,13 @@ static int exynos_asv_probe(struct platf return PTR_ERR(asv->chipid_regmap); } - regmap_read(asv->chipid_regmap, EXYNOS_CHIPID_REG_PRO_ID, &product_id); + ret = regmap_read(asv->chipid_regmap, EXYNOS_CHIPID_REG_PRO_ID, + &product_id); + if (ret < 0) { + dev_err(&pdev->dev, "Cannot read revision from ChipID: %d\n", + ret); + return -ENODEV; + } switch (product_id & EXYNOS_MASK) { case 0xE5422000: Patches currently in stable-queue which might be from krzk@xxxxxxxxxx are queue-5.11/regulator-s5m8767-drop-regulators-of-node-reference.patch queue-5.11/memory-mtk-smi-fix-pm-usage-counter-unbalance-in-mtk.patch queue-5.11/arm-dts-exynos-correct-pmic-interrupt-trigger-level-.patch-27844 queue-5.11/memory-ti-aemif-drop-child-node-when-jumping-out-loo.patch queue-5.11/arm-dts-exynos-correct-pmic-interrupt-trigger-level-.patch-18809 queue-5.11/soc-samsung-exynos-asv-don-t-defer-early-on-not-supported-socs.patch queue-5.11/arm64-dts-exynos-correct-pmic-interrupt-trigger-leve.patch-19801 queue-5.11/arm-dts-exynos-correct-pmic-interrupt-trigger-level-.patch-30617 queue-5.11/arm-dts-exynos-correct-pmic-interrupt-trigger-level-.patch queue-5.11/arm-dts-exynos-correct-pmic-interrupt-trigger-level-.patch-24783 queue-5.11/regulator-s5m8767-fix-reference-count-leak.patch queue-5.11/rtc-s5m-select-regmap_i2c.patch queue-5.11/arm-s3c-fix-fiq-for-clang-ias.patch queue-5.11/i2c-exynos5-preserve-high-speed-master-code.patch queue-5.11/soc-samsung-exynos-asv-handle-reading-revision-register-error.patch queue-5.11/arm64-dts-exynos-correct-pmic-interrupt-trigger-leve.patch queue-5.11/arm-dts-exynos-correct-pmic-interrupt-trigger-level-.patch-22522