* [PATCH next] firmware: qcom: scm: Fix error code in probe()
@ 2025-01-15 6:52 Dan Carpenter
2025-01-15 8:20 ` Krzysztof Kozlowski
0 siblings, 1 reply; 2+ messages in thread
From: Dan Carpenter @ 2025-01-15 6:52 UTC (permalink / raw)
To: Krzysztof Kozlowski
Cc: Bjorn Andersson, Konrad Dybcio, linux-arm-msm, linux-kernel,
kernel-janitors
Set the error code if devm_qcom_tzmem_pool_new() fails. Don't return
success.
Fixes: 1e76b546e6fc ("firmware: qcom: scm: Cleanup global '__scm' on probe failures")
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
---
drivers/firmware/qcom/qcom_scm.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/firmware/qcom/qcom_scm.c b/drivers/firmware/qcom/qcom_scm.c
index f0569bb9411f..fc4d67e4c4a6 100644
--- a/drivers/firmware/qcom/qcom_scm.c
+++ b/drivers/firmware/qcom/qcom_scm.c
@@ -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;
}
--
2.45.2
^ permalink raw reply [flat|nested] 2+ messages in thread* Re: [PATCH next] firmware: qcom: scm: Fix error code in probe()
2025-01-15 6:52 [PATCH next] firmware: qcom: scm: Fix error code in probe() Dan Carpenter
@ 2025-01-15 8:20 ` Krzysztof Kozlowski
0 siblings, 0 replies; 2+ messages in thread
From: Krzysztof Kozlowski @ 2025-01-15 8:20 UTC (permalink / raw)
To: Dan Carpenter
Cc: Bjorn Andersson, Konrad Dybcio, linux-arm-msm, linux-kernel,
kernel-janitors
On 15/01/2025 07:52, Dan Carpenter wrote:
> Set the error code if devm_qcom_tzmem_pool_new() fails. Don't return
> success.
>
> Fixes: 1e76b546e6fc ("firmware: qcom: scm: Cleanup global '__scm' on probe failures")
> Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
Uh, one can stare at own code for hours and never see the issue.
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2025-01-15 8:20 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-01-15 6:52 [PATCH next] firmware: qcom: scm: Fix error code in probe() Dan Carpenter
2025-01-15 8:20 ` Krzysztof Kozlowski
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®