From: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
To: Bjorn Andersson <andersson@kernel.org>,
Konrad Dybcio <konradybcio@kernel.org>,
Stephen Boyd <sboyd@kernel.org>,
Georgi Djakov <djakov@kernel.org>,
Rob Clark <robin.clark@oss.qualcomm.com>,
Brian Masney <masneyb@onstation.org>
Cc: linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH 3/3] soc: qcom: ocmem: return -EPROBE_DEFER is ocmem is not available
Date: Mon, 23 Mar 2026 03:20:59 +0200 [thread overview]
Message-ID: <20260323-ocmem-v1-3-ad9bcae44763@oss.qualcomm.com> (raw)
In-Reply-To: <20260323-ocmem-v1-0-ad9bcae44763@oss.qualcomm.com>
If OCMEM is declared in DT, it is expected that it is present and
handled by the driver. The GPU driver will ignore -ENODEV error, which
typically means that OCMEM isn't defined in DT. Let ocmem return
-EPROBE_DEFER if it supposed to be used, but it is not probed (yet).
Fixes: 88c1e9404f1d ("soc: qcom: add OCMEM driver")
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
---
drivers/soc/qcom/ocmem.c | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/drivers/soc/qcom/ocmem.c b/drivers/soc/qcom/ocmem.c
index d57baa9cfa03..c35a98984acc 100644
--- a/drivers/soc/qcom/ocmem.c
+++ b/drivers/soc/qcom/ocmem.c
@@ -203,10 +203,9 @@ struct ocmem *of_get_ocmem(struct device *dev)
ocmem = platform_get_drvdata(pdev);
put_device(&pdev->dev);
- if (!ocmem) {
- dev_err(dev, "Cannot get ocmem\n");
- return ERR_PTR(-ENODEV);
- }
+ if (!ocmem)
+ return ERR_PTR(dev_err_probe(dev, -EPROBE_DEFER, "Cannot get ocmem\n"));
+
return ocmem;
}
EXPORT_SYMBOL_GPL(of_get_ocmem);
--
2.47.3
next prev parent reply other threads:[~2026-03-23 1:21 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-23 1:20 [PATCH 0/3] soc: qcom: ocmem: let the driver work again Dmitry Baryshkov
2026-03-23 1:20 ` [PATCH 1/3] soc: qcom: ocmem: make the core clock optional Dmitry Baryshkov
2026-03-23 10:15 ` Konrad Dybcio
2026-03-23 1:20 ` [PATCH 2/3] soc: qcom: ocmem: register reasons for probe deferrals Dmitry Baryshkov
2026-03-23 10:16 ` Konrad Dybcio
2026-03-23 23:02 ` Dmitry Baryshkov
2026-03-23 11:07 ` Brian Masney
2026-03-23 23:03 ` Dmitry Baryshkov
2026-03-23 1:20 ` Dmitry Baryshkov [this message]
2026-03-23 10:17 ` [PATCH 3/3] soc: qcom: ocmem: return -EPROBE_DEFER is ocmem is not available Konrad Dybcio
2026-03-24 3:05 ` [PATCH 0/3] soc: qcom: ocmem: let the driver work again Bjorn Andersson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260323-ocmem-v1-3-ad9bcae44763@oss.qualcomm.com \
--to=dmitry.baryshkov@oss.qualcomm.com \
--cc=andersson@kernel.org \
--cc=djakov@kernel.org \
--cc=konradybcio@kernel.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=masneyb@onstation.org \
--cc=robin.clark@oss.qualcomm.com \
--cc=sboyd@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox