Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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: 75e0a1e30191 ("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>

authored by

Haotian Zhang and committed by
Bjorn Andersson
1e07ebe7 366f05e3

+1 -1
+1 -1
drivers/clk/qcom/common.c
··· 454 454 455 455 base = devm_platform_ioremap_resource(pdev, index); 456 456 if (IS_ERR(base)) 457 - return -ENOMEM; 457 + return PTR_ERR(base); 458 458 459 459 regmap = devm_regmap_init_mmio(&pdev->dev, base, desc->config); 460 460 if (IS_ERR(regmap))