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.

soc: qcom: gsbi: fix double disable caused by devm

In the commit referenced by the Fixes tag, devm_clk_get_enabled() was
introduced to replace devm_clk_get() and clk_prepare_enable(). While
the clk_disable_unprepare() call in the error path was correctly
removed, the one in the remove function was overlooked, leading to a
double disable issue.

Remove the redundant clk_disable_unprepare() call from gsbi_remove()
to fix this issue. Since all resources are now managed by devres
and will be automatically released, the remove function serves no purpose
and can be deleted entirely.

Fixes: 489d7a8cc286 ("soc: qcom: use devm_clk_get_enabled() in gsbi_probe()")
Signed-off-by: Haotian Zhang <vulab@iscas.ac.cn>
Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
Link: https://lore.kernel.org/stable/20251020160215.523-1-vulab%40iscas.ac.cn
Link: https://lore.kernel.org/r/20251020160215.523-1-vulab@iscas.ac.cn
Signed-off-by: Bjorn Andersson <andersson@kernel.org>

authored by

Haotian Zhang and committed by
Bjorn Andersson
2286e18e dcbce2c2

-8
-8
drivers/soc/qcom/qcom_gsbi.c
··· 212 212 return of_platform_populate(node, NULL, NULL, &pdev->dev); 213 213 } 214 214 215 - static void gsbi_remove(struct platform_device *pdev) 216 - { 217 - struct gsbi_info *gsbi = platform_get_drvdata(pdev); 218 - 219 - clk_disable_unprepare(gsbi->hclk); 220 - } 221 - 222 215 static const struct of_device_id gsbi_dt_match[] = { 223 216 { .compatible = "qcom,gsbi-v1.0.0", }, 224 217 { }, ··· 225 232 .of_match_table = gsbi_dt_match, 226 233 }, 227 234 .probe = gsbi_probe, 228 - .remove = gsbi_remove, 229 235 }; 230 236 231 237 module_platform_driver(gsbi_driver);