Skip to content

Commit

Permalink
firmware: qcom: scm: Fix error code in probe()
Browse files Browse the repository at this point in the history
Set the error code if devm_qcom_tzmem_pool_new() fails.  Don't return
success.

Fixes: 1e76b54 ("firmware: qcom: scm: Cleanup global '__scm' on probe failures")
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/a0845467-4f83-4070-ab1e-ff7e6764609f@stanley.mountain
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
  • Loading branch information
Dan Carpenter authored and Bjorn Andersson committed Feb 5, 2025
1 parent 1ac98d6 commit 7f048b2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/firmware/qcom/qcom_scm.c
Original file line number Diff line number Diff line change
Expand Up @@ -2301,8 +2301,8 @@ static int qcom_scm_probe(struct platform_device *pdev)

__scm->mempool = devm_qcom_tzmem_pool_new(__scm->dev, &pool_config);
if (IS_ERR(__scm->mempool)) {
dev_err_probe(__scm->dev, PTR_ERR(__scm->mempool),
"Failed to create the SCM memory pool\n");
ret = dev_err_probe(__scm->dev, PTR_ERR(__scm->mempool),
"Failed to create the SCM memory pool\n");
goto err;
}

Expand Down

0 comments on commit 7f048b2

Please sign in to comment.