Skip to contentSkip to conversation

soc: qcom: smem: handle ENOMEM error during probe

PATCH Applied Jorge Ramirez-Ortiz 3 participants 3 messages Dec 9, 2025 – Dec 17, 2025

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 soc: qcom: smem: handle ENOMEM error during probe

Fail the driver probe if the region can't be mapped

---
 drivers/soc/qcom/smem.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/soc/qcom/smem.c +3 -1
index c4c45f15dca4..e91dfc123af2 100644
@@ -1215,7 +1215,9 @@ static int qcom_smem_probe(struct platform_device *pdev)
 		smem->item_count = qcom_smem_get_item_count(smem);
 		break;
 	case SMEM_GLOBAL_HEAP_VERSION:
-		qcom_smem_map_global(smem, size);
+		ret = qcom_smem_map_global(smem, size);
+		if (ret < 0)
+			return ret;
 		smem->item_count = SMEM_ITEM_COUNT;
 		break;
 	default:
Signature · 1 line
2.43.0
maintainer Applied
#2 lore raw
In reply to Jorge Ramirez-Ortiz
Quoted 3 lines · Jorge Ramirez-Ortiz

Fail the driver probe if the region can't be mapped

Applied, thanks!

[1/1] soc: qcom: smem: handle ENOMEM error during probe

      commit: 0fe01a7955f4fef97e7cc6d14bfc5931c660402b

Best regards,

Signature · 1 line
Bjorn Andersson <[email protected]>