interconnect: qcom: sdm845: Walk the list safely on node removal
authorGeorgi Djakov <georgi.djakov@linaro.org>
Thu, 12 Dec 2019 07:53:30 +0000 (09:53 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 17 Dec 2019 18:55:38 +0000 (19:55 +0100)
commit48b47dfd0441eb1eafe6fef7402abaf18a47f207
tree9e1ea3ecb1f2fc263fc0ea2f58dee2459f7dc90b
parente6406776137bc5187fb7f1bce76785deac6f84d4
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: b5d2f741077a ("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>
drivers/interconnect/qcom/sdm845.c