diff options
author | Wei Yongjun <weiyongjun1@huawei.com> | 2016-08-28 16:29:10 +0000 |
---|---|---|
committer | Andy Gross <andy.gross@linaro.org> | 2016-11-12 23:24:51 -0600 |
commit | bd4760ca03156731674a570e44490986189d8228 (patch) | |
tree | 9d7d1f3e52dc87e37b78f0d043f9aa8ba9423006 /drivers/firmware | |
parent | 4fb1a4207804caeb9ef03c449dfd51446bf3d014 (diff) | |
download | linux-bd4760ca03156731674a570e44490986189d8228.tar.gz linux-bd4760ca03156731674a570e44490986189d8228.tar.bz2 linux-bd4760ca03156731674a570e44490986189d8228.zip |
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>
Diffstat (limited to 'drivers/firmware')
-rw-r--r-- | drivers/firmware/qcom_scm.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/firmware/qcom_scm.c b/drivers/firmware/qcom_scm.c index d95c70227c05..9bf66aefdbd0 100644 --- a/drivers/firmware/qcom_scm.c +++ b/drivers/firmware/qcom_scm.c @@ -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); |