From: Manivannan Sadhasivam via B4 Relay <devnull+manivannan.sadhasivam.oss.qualcomm.com@kernel.org>
To: Bjorn Andersson <andersson@kernel.org>,
Konrad Dybcio <konradybcio@kernel.org>,
Adrian Hunter <adrian.hunter@intel.com>,
Ulf Hansson <ulf.hansson@linaro.org>,
Manivannan Sadhasivam <mani@kernel.org>,
"James E.J. Bottomley" <James.Bottomley@HansenPartnership.com>,
"Martin K. Petersen" <martin.petersen@oracle.com>,
Abel Vesa <abelvesa@kernel.org>, Abel Vesa <abelvesa@kernel.org>
Cc: linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-mmc@vger.kernel.org, linux-scsi@vger.kernel.org,
Sumit Garg <sumit.garg@oss.qualcomm.com>,
mani@kernel.org, Neeraj Soni <neeraj.soni@oss.qualcomm.com>,
Manivannan Sadhasivam <manivannan.sadhasivam@oss.qualcomm.com>,
Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
Subject: [PATCH v5 4/5] mmc: sdhci-msm: Remove NULL check from devm_of_qcom_ice_get()
Date: Sun, 08 Mar 2026 11:57:30 +0530 [thread overview]
Message-ID: <20260308-qcom-ice-fix-v5-4-e47e8a44b6c4@oss.qualcomm.com> (raw)
In-Reply-To: <20260308-qcom-ice-fix-v5-0-e47e8a44b6c4@oss.qualcomm.com>
From: Manivannan Sadhasivam <manivannan.sadhasivam@oss.qualcomm.com>
Now since the devm_of_qcom_ice_get() API never returns NULL, remove the
NULL check and also simplify the error handling.
Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
Acked-by: Ulf Hansson <ulf.hansson@linaro.org>
Acked-by: Adrian Hunter <adrian.hunter@intel.com>
Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@oss.qualcomm.com>
---
drivers/mmc/host/sdhci-msm.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/drivers/mmc/host/sdhci-msm.c b/drivers/mmc/host/sdhci-msm.c
index 3b85233131b3..8d862079cf17 100644
--- a/drivers/mmc/host/sdhci-msm.c
+++ b/drivers/mmc/host/sdhci-msm.c
@@ -1906,14 +1906,14 @@ static int sdhci_msm_ice_init(struct sdhci_msm_host *msm_host,
return 0;
ice = devm_of_qcom_ice_get(dev);
- if (ice == ERR_PTR(-EOPNOTSUPP)) {
+ if (IS_ERR(ice)) {
+ if (ice != ERR_PTR(-EOPNOTSUPP))
+ return PTR_ERR(ice);
+
dev_warn(dev, "Disabling inline encryption support\n");
- ice = NULL;
+ return 0;
}
- if (IS_ERR_OR_NULL(ice))
- return PTR_ERR_OR_ZERO(ice);
-
if (qcom_ice_get_supported_key_type(ice) != BLK_CRYPTO_KEY_TYPE_RAW) {
dev_warn(dev, "Wrapped keys not supported. Disabling inline encryption support.\n");
return 0;
--
2.51.0
next prev parent reply other threads:[~2026-03-08 6:27 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-08 6:27 [PATCH v5 0/5] soc: qcom: ice: Fix race between qcom_ice_probe() and of_qcom_ice_get() Manivannan Sadhasivam via B4 Relay
2026-03-08 6:27 ` [PATCH v5 1/5] " Manivannan Sadhasivam via B4 Relay
2026-03-08 18:21 ` kernel test robot
2026-03-08 6:27 ` [PATCH v5 2/5] soc: qcom: ice: Return -ENODEV if the ICE platform device is not found Manivannan Sadhasivam via B4 Relay
2026-03-08 6:27 ` [PATCH v5 3/5] soc: qcom: ice: Return proper error codes from devm_of_qcom_ice_get() instead of NULL Manivannan Sadhasivam via B4 Relay
2026-03-08 6:27 ` Manivannan Sadhasivam via B4 Relay [this message]
2026-03-08 6:27 ` [PATCH v5 5/5] scsi: ufs: ufs-qcom: Remove NULL check from devm_of_qcom_ice_get() Manivannan Sadhasivam via B4 Relay
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=20260308-qcom-ice-fix-v5-4-e47e8a44b6c4@oss.qualcomm.com \
--to=devnull+manivannan.sadhasivam.oss.qualcomm.com@kernel.org \
--cc=James.Bottomley@HansenPartnership.com \
--cc=abelvesa@kernel.org \
--cc=adrian.hunter@intel.com \
--cc=andersson@kernel.org \
--cc=konrad.dybcio@oss.qualcomm.com \
--cc=konradybcio@kernel.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mmc@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=mani@kernel.org \
--cc=manivannan.sadhasivam@oss.qualcomm.com \
--cc=martin.petersen@oracle.com \
--cc=neeraj.soni@oss.qualcomm.com \
--cc=sumit.garg@oss.qualcomm.com \
--cc=ulf.hansson@linaro.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