1
0
Fork 0

firmware: qcom: scm: Use devm_reset_controller_register()

Use devm_reset_controller_register() for the reset controller
registration and fixes the memory leak when unload the module.

Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
Signed-off-by: Andy Gross <andy.gross@linaro.org>
hifive-unleashed-5.1
Wei Yongjun 2016-08-28 16:29:10 +00:00 committed by Andy Gross
parent 4fb1a42078
commit bd4760ca03
1 changed files with 3 additions and 1 deletions

View File

@ -356,7 +356,9 @@ static int qcom_scm_probe(struct platform_device *pdev)
scm->reset.ops = &qcom_scm_pas_reset_ops;
scm->reset.nr_resets = 1;
scm->reset.of_node = pdev->dev.of_node;
reset_controller_register(&scm->reset);
ret = devm_reset_controller_register(&pdev->dev, &scm->reset);
if (ret)
return ret;
/* vote for max clk rate for highest performance */
ret = clk_set_rate(scm->core_clk, INT_MAX);