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.
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
On Tue, 10 Feb 2026 at 07:56, Manivannan Sadhasivam via B4 Relay
<devnull+manivannan.sadhasivam.oss.qualcomm.com@kernel.org> wrote:
>
> 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.
>
> Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@oss.qualcomm.com>
Please take this through the qcom-soc tree.
Acked-by: Ulf Hansson <ulf.hansson@linaro.org>
> ---
> 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
>
>
On 2/10/26 7:56 AM, Manivannan Sadhasivam via B4 Relay wrote: > 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. > > Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@oss.qualcomm.com> > --- Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com> Konrad
On 10/02/2026 08:56, Manivannan Sadhasivam via B4 Relay wrote:
> 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.
>
> Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@oss.qualcomm.com>
Acked-by: Adrian Hunter <adrian.hunter@intel.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;
>
© 2016 - 2026 Red Hat, Inc.