linux/drivers/pinctrl/qcom
Stephen Boyd ce441cb4f1 pinctrl: qcom: Don't iterate past end of function array
commit bcd53f858d upstream.

Timur reports that this code crashes if nfunctions is 0. Fix the
loop iteration to only consider valid elements of the functions
array.

Reported-by: Timur Tabi <timur@codeaurora.org>
Cc: Pramod Gurav <pramod.gurav@smartplayin.com>
Cc: Bjorn Andersson <bjorn.andersson@sonymobile.com>
Cc: Ivan T. Ivanov <iivanov@mm-sol.com>
Cc: Andy Gross <agross@codeaurora.org>
Fixes: 327455817a "pinctrl: qcom: Add support for reset for apq8064"
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
History 2015-01-29 17:40:42 -08:00
..
Kconfig pinctrl: qcom: Add APQ8084 pinctrl support 2014-09-04 18:14:59 +02:00
Makefile pinctrl: qcom: Add APQ8084 pinctrl support 2014-09-04 18:14:59 +02:00
pinctrl-apq8064.c pinctrl: qcom: Make the target processor value configurable 2014-09-04 18:19:31 +02:00
pinctrl-apq8084.c pinctrl: qcom: Make the target processor value configurable 2014-09-04 18:19:31 +02:00
pinctrl-ipq8064.c pinctrl: qcom: Make the target processor value configurable 2014-09-04 18:19:31 +02:00
pinctrl-msm.c pinctrl: qcom: Don't iterate past end of function array 2015-01-29 17:40:42 -08:00
pinctrl-msm.h pinctrl: qcom: Make the target processor value configurable 2014-09-04 18:19:31 +02:00
pinctrl-msm8x74.c pinctrl: qcom: Make the target processor value configurable 2014-09-04 18:19:31 +02:00
pinctrl-msm8960.c pinctrl: qcom: Make the target processor value configurable 2014-09-04 18:19:31 +02:00