interconnect: qcom: qcs404: Walk the list safely on node removal
authorGeorgi Djakov <georgi.djakov@linaro.org>
Thu, 12 Dec 2019 07:53:31 +0000 (09:53 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 12 Dec 2019 09:28:53 +0000 (10:28 +0100)
commitf39488ea2a75c49634c8611090f58734f61eee7c
tree8e3229d80745a3f9248ada56eae90f74b800e78c
parentb29b8113bb41285eb7ed55ce0c65017b5c0240f7
interconnect: qcom: qcs404: Walk the list safely on node removal

As we will remove items off the list using list_del(), we need to use the
safe version of list_for_each_entry().

Fixes: 5e4e6c4d3ae0 ("interconnect: qcom: Add QCS404 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.4
Link: https://lore.kernel.org/r/20191212075332.16202-4-georgi.djakov@linaro.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/interconnect/qcom/qcs404.c