mirror of
https://github.com/torvalds/linux.git
synced 2026-03-08 05:04:51 +01:00
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: 75e0a1e301 ("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>
This commit is contained in:
parent
366f05e348
commit
1e07ebe744
1 changed files with 1 additions and 1 deletions
|
|
@ -454,7 +454,7 @@ int qcom_cc_probe_by_index(struct platform_device *pdev, int index,
|
|||
|
||||
base = devm_platform_ioremap_resource(pdev, index);
|
||||
if (IS_ERR(base))
|
||||
return -ENOMEM;
|
||||
return PTR_ERR(base);
|
||||
|
||||
regmap = devm_regmap_init_mmio(&pdev->dev, base, desc->config);
|
||||
if (IS_ERR(regmap))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue