]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
soc: qcom: ice: Fix the error code when 'qcom,ice' property is not found
authorManivannan Sadhasivam <manivannan.sadhasivam@oss.qualcomm.com>
Wed, 20 May 2026 15:57:04 +0000 (21:27 +0530)
committerBjorn Andersson <andersson@kernel.org>
Thu, 21 May 2026 23:18:44 +0000 (18:18 -0500)
When both 'ice' reg entry and 'qcom,ice' property are not found in DT, then
it implies that ICE is not supported. So return -EOPNOTSUPP instead of
-ENODEV to client drivers to specify ICE functionality is not supported.

Fixes: b9ab7217dd7d ("soc: qcom: ice: Return proper error codes from devm_of_qcom_ice_get() instead of NULL")
Reported-by: Marek Szyprowski <m.szyprowski@samsung.com>
Closes: https://lore.kernel.org/linux-arm-msm/8bac0358-9da0-4cbb-98ee-333b85ba4908@samsung.com
Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@oss.qualcomm.com>
Link: https://lore.kernel.org/r/20260520155704.130803-1-manivannan.sadhasivam@oss.qualcomm.com
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
drivers/soc/qcom/ice.c

index e26d5a64763cb69041257570bbd6342dd18f6898..5f20108aa03ebe9a47a10fba9afde420add0f34a 100644 (file)
@@ -658,7 +658,7 @@ static struct qcom_ice *of_qcom_ice_get(struct device *dev)
        struct device_node *node __free(device_node) = of_parse_phandle(dev->of_node,
                                                                        "qcom,ice", 0);
        if (!node)
-               return ERR_PTR(-ENODEV);
+               return ERR_PTR(-EOPNOTSUPP);
 
        pdev = of_find_device_by_node(node);
        if (!pdev) {