Skip to content

Commit 1e07ebe

Browse files
ISCAS-Vulabandersson
authored andcommitted
clk: qcom: Return correct error code in qcom_cc_probe_by_index()
When devm_platform_ioremap_resource() fails, it returns various error codes. Returning a hardcoded -ENOMEM masks the actual failure reason. Use PTR_ERR() to propagate the actual error code returned by devm_platform_ioremap_resource() instead of -ENOMEM. Fixes: 75e0a1e ("clk: qcom: define probe by index API as common API") Signed-off-by: Haotian Zhang <vulab@iscas.ac.cn> Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com> Link: https://lore.kernel.org/r/20251217041338.2432-1-vulab@iscas.ac.cn Signed-off-by: Bjorn Andersson <andersson@kernel.org>
1 parent 366f05e commit 1e07ebe

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

drivers/clk/qcom/common.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -454,7 +454,7 @@ int qcom_cc_probe_by_index(struct platform_device *pdev, int index,
454454

455455
base = devm_platform_ioremap_resource(pdev, index);
456456
if (IS_ERR(base))
457-
return -ENOMEM;
457+
return PTR_ERR(base);
458458

459459
regmap = devm_regmap_init_mmio(&pdev->dev, base, desc->config);
460460
if (IS_ERR(regmap))

0 commit comments

Comments
 (0)