mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-07 04:12:04 -04:00
interconnect: qcom: sdm845: Walk the list safely on node removal
commit b29b8113bb41285eb7ed55ce0c65017b5c0240f7 upstream.
As we will remove items off the list using list_del(), we need to use the
safe version of list_for_each_entry().
Fixes: b5d2f74107 ("interconnect: qcom: Add sdm845 interconnect provider driver")
Reported-by: Dmitry Osipenko <digetx@gmail.com>
Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Signed-off-by: Georgi Djakov <georgi.djakov@linaro.org>
Cc: <stable@vger.kernel.org> # v5.3+
Link: https://lore.kernel.org/r/20191212075332.16202-3-georgi.djakov@linaro.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
e640677613
commit
48b47dfd04
1 changed files with 2 additions and 2 deletions
|
|
@ -868,9 +868,9 @@ static int qnoc_remove(struct platform_device *pdev)
|
|||
{
|
||||
struct qcom_icc_provider *qp = platform_get_drvdata(pdev);
|
||||
struct icc_provider *provider = &qp->provider;
|
||||
struct icc_node *n;
|
||||
struct icc_node *n, *tmp;
|
||||
|
||||
list_for_each_entry(n, &provider->nodes, node_list) {
|
||||
list_for_each_entry_safe(n, tmp, &provider->nodes, node_list) {
|
||||
icc_node_del(n);
|
||||
icc_node_destroy(n->id);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue