Skip to content
/ linux Public

Commit d32e833

Browse files
ldtsgregkh
authored andcommitted
soc: qcom: smem: handle ENOMEM error during probe
[ Upstream commit 0fe01a7 ] Fail the driver probe if the region can't be mapped Signed-off-by: Jorge Ramirez-Ortiz <jorge.ramirez@oss.qualcomm.com> Fixes: 20bb6c9 ("soc: qcom: smem: map only partitions used by local HOST") Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com> Link: https://lore.kernel.org/r/20251209074610.3751781-1-jorge.ramirez@oss.qualcomm.com Signed-off-by: Bjorn Andersson <andersson@kernel.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
1 parent 4f73486 commit d32e833

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

drivers/soc/qcom/smem.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1215,7 +1215,9 @@ static int qcom_smem_probe(struct platform_device *pdev)
12151215
smem->item_count = qcom_smem_get_item_count(smem);
12161216
break;
12171217
case SMEM_GLOBAL_HEAP_VERSION:
1218-
qcom_smem_map_global(smem, size);
1218+
ret = qcom_smem_map_global(smem, size);
1219+
if (ret < 0)
1220+
return ret;
12191221
smem->item_count = SMEM_ITEM_COUNT;
12201222
break;
12211223
default:

0 commit comments

Comments
 (0)